2024-05-17 16:12:35 +00:00
|
|
|
name: Run tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
2024-05-28 07:00:58 +00:00
|
|
|
check-lockfile:
|
|
|
|
name: check lockfile correctness
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check that lockfile does not need an update
|
2024-08-03 09:29:29 +00:00
|
|
|
run: pnpm install --frozen-lockfile
|
2024-05-28 07:00:58 +00:00
|
|
|
|
2024-05-17 16:12:35 +00:00
|
|
|
test-web:
|
|
|
|
name: web sanity check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run test script
|
|
|
|
run: .github/test.sh web
|
|
|
|
|
|
|
|
test-api:
|
|
|
|
name: api sanity check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run test script
|
2024-05-28 07:00:58 +00:00
|
|
|
run: .github/test.sh api
|
2024-07-09 18:30:24 +00:00
|
|
|
|
|
|
|
check-services:
|
|
|
|
name: test service functionality
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
services: ${{ steps.checkServices.outputs.service_list }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- id: checkServices
|
2024-08-03 09:29:29 +00:00
|
|
|
run: npm ci && echo "service_list=$(node api/src/util/test-ci get-services)" >> "$GITHUB_OUTPUT"
|
2024-07-09 18:30:24 +00:00
|
|
|
|
|
|
|
test-services:
|
|
|
|
needs: check-services
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
service: ${{ fromJson(needs.check-services.outputs.services) }}
|
|
|
|
name: "test service: ${{ matrix.service }}"
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
2024-08-03 09:29:29 +00:00
|
|
|
- run: npm ci && node api/src/util/test-ci run-tests-for ${{ matrix.service }}
|