Skip to content

Commit

Permalink
fix(gha): ensure all packages are intalled with --legacy-peer-deps pr…
Browse files Browse the repository at this point in the history
…ior to test execution
  • Loading branch information
Abhi Markan committed Dec 20, 2023
1 parent 3876b4a commit c227b10
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ jobs:
with:
node-version: ${{ vars.NODE_VERSION }}

- name: Dependencies
working-directory: ./
run: npm run ci:all

- name: UI
working-directory: ./src/ui
env:
Expand All @@ -97,9 +101,7 @@ jobs:
GOV_NOTIFY_EMAIL_RECIPIENT_1: ${{ secrets.GOV_NOTIFY_EMAIL_RECIPIENT_1 }}
GOV_NOTIFY_EMAIL_RECIPIENT_2: ${{ secrets.GOV_NOTIFY_EMAIL_RECIPIENT_2 }}
MOCK_ACCOUNT_PASSWORD: ${{ secrets.MOCK_ACCOUNT_PASSWORD }}
run: |
npm ci --legacy-peer-deps
npm run test
run: npm run test

# 3. API - API test cases
api-tests:
Expand Down Expand Up @@ -127,6 +129,10 @@ jobs:
with:
node-version: ${{ vars.NODE_VERSION }}

- name: Dependencies
working-directory: ./
run: npm run ci:all

- name: API
working-directory: ./
env:
Expand Down Expand Up @@ -156,7 +162,6 @@ jobs:
JWT_SIGNING_KEY: ${{ secrets.JWT_SIGNING_KEY }}
run: |
docker-compose up --build -d
npm ci --legacy-peer-deps --prefix ./src/api
npm run test --prefix ./src/api
# 4. E2E - Insurance
Expand Down Expand Up @@ -235,7 +240,7 @@ jobs:

- name: Dependencies
working-directory: ./
run: npm ci --legacy-peer-deps
run: npm run ci:all

- name: Docker
run: docker-compose up --build -d
Expand Down Expand Up @@ -291,7 +296,7 @@ jobs:

- name: Dependencies
working-directory: ./
run: npm ci --legacy-peer-deps
run: npm run ci:all

- name: Docker
run: docker-compose up --build -d
Expand Down Expand Up @@ -336,7 +341,7 @@ jobs:

- name: Dependencies
working-directory: ./
run: npm ci --legacy-peer-deps
run: npm run ci:all

- name: Docker
run: docker-compose up --build -d
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"housekeeping": "npm run update:all && npm run install:all && npm run lint:fix:all && npm run audit:all",
"postinstall": "husky install",
"install:all": "npm i --legacy-peer-deps && npm i --legacy-peer-deps --prefix ./src/ui && npm i --legacy-peer-deps --prefix ./src/api && npm i --legacy-peer-deps --prefix ./generate-exip-pricing-grid",
"ci:all": "npm ci --legacy-peer-deps && npm ci --legacy-peer-deps --prefix ./src/ui && npm ci --legacy-peer-deps --prefix ./src/api && npm ci --legacy-peer-deps --prefix ./generate-exip-pricing-grid",
"lint": "npm i --legacy-peer-deps && npm i --legacy-peer-deps --prefix ./src/ui && eslint --ext .ts src/ui && npm i --legacy-peer-deps --prefix ./src/api && eslint --ext .ts src/api && eslint --ext .js e2e-tests",
"lint:fix": "prettier --write src/ui && eslint --ext .ts src/api --fix && eslint --ext .ts src/ui --fix && eslint --ext .js e2e-tests --fix",
"lint:fix:all": "prettier --write src/ui && eslint --ext .ts src/api --fix && eslint --ext .ts src/ui --fix && eslint --ext .js e2e-tests --fix",
Expand Down

0 comments on commit c227b10

Please sign in to comment.