Skip to content

Commit

Permalink
ci(docker): separate testing and linting from the build
Browse files Browse the repository at this point in the history
Creates new CI steps to run the lint and test commands, rather than having them run inside the Docker build. This means
that the image can be built even if there are linting issues (which will be useful for local development), and that the
tests will be able to make use of other processes (and given the app has a reliance on React and Postgres, this is
vital).

Refs #388, #390
  • Loading branch information
thewilkybarkid committed Jul 27, 2021
1 parent 27a01d9 commit 7cca910
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/deploy_prereview-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
- name: 'Build dev image'
run: docker-compose --file docker-compose.yml --file docker-compose.dev.yml build prereview

- name: 'Lint'
run: docker-compose --file docker-compose.yml --file docker-compose.dev.yml run --entrypoint "npm run" prereview lint

- name: 'Test'
run: docker-compose --file docker-compose.yml --file docker-compose.dev.yml run --entrypoint "npm run" prereview test

- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ RUN npm ci

COPY . .

RUN npm run lint
RUN npm run test

ENV NODE_ENV=production

# Avoid lscpu warning on Alpine
Expand Down

0 comments on commit 7cca910

Please sign in to comment.