Skip to content

Merge pull request #40 from UtrechtUniversity/dev #30

Merge pull request #40 from UtrechtUniversity/dev

Merge pull request #40 from UtrechtUniversity/dev #30

Workflow file for this run

name: CI_CD
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
jobs:
build:
name: Build Project
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js Environment
uses: ./.github/actions/setup-node
- name: Build project
run: npm run build
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js Environment
uses: ./.github/actions/setup-node
- name: Run Jest Unit Tests
run: npm test -- --ci --testPathPattern ".*\\.unit\\.test\\.tsx$"
integration-tests:
name: Run Integration Tests
runs-on: ubuntu-latest
needs: unit-tests
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js Environment
uses: ./.github/actions/setup-node
- name: Run Jest Integration Tests
run: npm test -- --ci --testPathPattern ".*\\.integration\\.test\\.tsx$"
cypress-tests:
name: Run Cypress Tests
runs-on: ubuntu-latest
needs: integration-tests
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js Environment
uses: ./.github/actions/setup-node
- name: Start application
run: |
npm start &
npx wait-on http://localhost:3000
- name: Run Cypress tests
uses: cypress-io/github-action@v5
with:
browser: chrome