Skip to content

Commit

Permalink
fix: fix github workflows not matching proper apps
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Oct 28, 2024
1 parent 58e5c05 commit 0b3aa21
Show file tree
Hide file tree
Showing 12 changed files with 2,018,248 additions and 41,178 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/code_check_backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Backend

on:
push:
paths:
- "backend/**"
- ".github/workflows/code_check_backend.yml"

defaults:
run:
working-directory: backend

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}

- name: Set up Node.js & Install dependencies
uses: actions/setup-node@v4

- run: npm ci

- name: 🧪 Test
run: |
npm run test
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}

- name: Set up Node.js
uses: actions/setup-node@v4

- run: npm ci

- name: 👕 Lint
run: |
npm run lint
type_check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}

- name: Set up Node.js
uses: actions/setup-node@v4

- run: npm ci

- name: 🔍 Type Check
run: |
npm run tsc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Test, Lint & Type Check
name: Frontend

on:
push:
paths:
- "frontend/**"
- ".github/workflows/code_check_frontend.yml"

jobs:
test:
Expand Down
9 changes: 5 additions & 4 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"start": "nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:dev": "nest start --watch",
"start:prod": "node dist/main",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
"test:e2e": "jest --config ./test/jest-e2e.json",
"test:watch": "jest --watch",
"tsc": "npx tsc --noEmit --skipLibCheck"
},
"dependencies": {
"@nestjs/common": "^10.0.0",
Expand Down
Loading

0 comments on commit 0b3aa21

Please sign in to comment.