2024-05-17 17:12:35 +01:00
|
|
|
name: Run tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
2024-05-28 08:00:58 +01:00
|
|
|
check-lockfile:
|
|
|
|
name: check lockfile correctness
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-08-03 10:50:24 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-08-03 10:32:42 +01:00
|
|
|
- uses: pnpm/action-setup@v4
|
2024-05-28 08:00:58 +01:00
|
|
|
- name: Check that lockfile does not need an update
|
2024-08-03 10:29:29 +01:00
|
|
|
run: pnpm install --frozen-lockfile
|
2024-05-28 08:00:58 +01:00
|
|
|
|
2024-05-17 17:12:35 +01:00
|
|
|
test-web:
|
|
|
|
name: web sanity check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-08-03 10:50:24 +01:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: lts
|
2024-08-03 10:32:42 +01:00
|
|
|
- uses: pnpm/action-setup@v4
|
2024-08-03 10:50:24 +01:00
|
|
|
- run: .github/test.sh web
|
2024-05-17 17:12:35 +01:00
|
|
|
|
|
|
|
test-api:
|
|
|
|
name: api sanity check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-08-03 10:50:24 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-08-03 10:32:42 +01:00
|
|
|
- uses: pnpm/action-setup@v4
|
2024-08-03 10:50:24 +01:00
|
|
|
- run: .github/test.sh api
|
2024-07-09 19:30:24 +01:00
|
|
|
|
|
|
|
check-services:
|
|
|
|
name: test service functionality
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
services: ${{ steps.checkServices.outputs.service_list }}
|
|
|
|
steps:
|
2024-08-03 10:50:24 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-08-03 10:32:42 +01:00
|
|
|
- uses: pnpm/action-setup@v4
|
2024-07-09 19:30:24 +01:00
|
|
|
- id: checkServices
|
2024-08-03 10:32:42 +01:00
|
|
|
run: pnpm i --frozen-lockfile && echo "service_list=$(node api/src/util/test-ci get-services)" >> "$GITHUB_OUTPUT"
|
2024-07-09 19:30:24 +01: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:
|
2024-08-03 10:50:24 +01:00
|
|
|
- uses: actions/checkout@v4
|
2024-08-03 10:32:42 +01:00
|
|
|
- uses: pnpm/action-setup@v4
|
|
|
|
- run: pnpm i --frozen-lockfile && node api/src/util/test-ci run-tests-for ${{ matrix.service }}
|