Skip to content

Commit

Permalink
build: add e2e testing in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
SverreNystad committed Sep 20, 2024
1 parent 17ffe83 commit d414fa0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,37 @@ jobs:
docker compose up -d
docker compose run backend python manage.py test
docker compose down
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Navigate to frontend folder
working-directory: frontend
run: |
npm install
# Cache npm dependencies to speed up subsequent builds
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: frontend/node_modules
key: ${{ runner.os }}-npm-cache
restore-keys: |
${{ runner.os }}-npm-cache
# Install npm dependencies and run Cypress tests
- name: Build and start frontend
working-directory: frontend
run: |
npm run build
npm start &
- name: Cypress run
uses: cypress-io/github-action@v6
with:
working-directory: frontend
build: npm run build
start: npm start

0 comments on commit d414fa0

Please sign in to comment.