Skip to content

Commit

Permalink
ci: update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Aug 25, 2024
1 parent 8022ee8 commit a1fbaa6
Showing 1 changed file with 35 additions and 30 deletions.
65 changes: 35 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,40 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
mongodb-version: [4]
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Download localisations
uses: localazy/download@v1
with:
read_key: ${{ secrets.LOCALAZY_READ_KEY }}
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
- name: Install packages and symlink local dependencies
# Can’t use npm ci due to https://github.com/npm/cli/issues/4828
run: |
npm i --package-lock=false
- name: Lint code
run: |
npm run lint
- name: Run tests
env:
NODE_ENV: test
SECRET: ${{ secrets.SECRET }}
run: |
npm test
steps:
- name: Remove unused Docker images
run: docker system prune -af
- name: Remove temporary files
run: sudo rm -rf /tmp/*
- name: Git checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Download localisations
uses: localazy/download@v1
with:
read_key: ${{ secrets.LOCALAZY_READ_KEY }}
write_key: ${{ secrets.LOCALAZY_WRITE_KEY }}
- name: Install packages and symlink local dependencies
# Can’t use npm ci due to https://github.com/npm/cli/issues/4828
run: |
npm i --package-lock=false
- name: Lint code
run: |
npm run lint
- name: Run tests
env:
NODE_ENV: test
SECRET: ${{ secrets.SECRET }}
run: |
npm test

0 comments on commit a1fbaa6

Please sign in to comment.