Skip to content

Merge pull request #529 from leih-lokal/various-2024-12 #1067

Merge pull request #529 from leih-lokal/various-2024-12

Merge pull request #529 from leih-lokal/various-2024-12 #1067

Workflow file for this run

name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: Frontend/node_modules
key: node-modules-${{ hashFiles('Frontend/package-lock.json') }}
- name: Install Dependencies
working-directory: Frontend
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Unit Test
working-directory: Frontend
run: npm run unit_test
- name: Install Chrome
run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && sudo apt install ./google-chrome-stable_current_amd64.deb
- name: Start CouchDB
run: docker compose up -d couchdb
- name: Wait for CouchDB
uses: iFaxity/wait-on-action@v1
with:
resource: http://127.0.0.1:5984
delay: 500
- name: Insert Testdata
run: docker compose up testdata_generator
- name: Run cypress integration tests
uses: cypress-io/github-action@v6
with:
working-directory: "./Frontend"
command: npm run integration_test_cypress:run
browser: chrome
record: true
- name: Upload cypress failure screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: Frontend/cypress/screenshots
- name: Run selenium integration tests
working-directory: Frontend
run: npm run integration_test_selenium