Skip to content

chore: update lint stage #27

chore: update lint stage

chore: update lint stage #27

Workflow file for this run

---
name: Nest.JS clean architecture CI
on:
push:
branches: ['*']
pull_request:
branches: [main]
jobs:
lint-commit:
runs-on: ubuntu-latest
steps:
- name: Copy repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Lint commit
run: npx commitlint --last --verbose
lint-code:
runs-on: ubuntu-latest
steps:
- name: Copy repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Lint code
run: pnpm lint
test:
runs-on: ubuntu-latest
steps:
- name: Copy repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test:cov
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-e2e:
runs-on: ubuntu-latest
steps:
- name: Copy repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Setup env
run: cp .env.development.local.example .env.development.local && cp .env.development.example
.env.development
- name: Install dependencies
run: pnpm install
- name: Run PostgreSQL container
run: pnpm docker:up
- name: Sleep for 10 seconds wait for container
run: sleep 10s
shell: bash
- name: Run tests
run: pnpm test:e2e