mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
name: Run tests
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
jobs:
|
|
check-lockfile:
|
|
name: check lockfile correctness
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
- name: Check that lockfile does not need an update
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
test-web:
|
|
name: web sanity check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@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
|
|
- uses: pnpm/action-setup@v4
|
|
- name: Run test script
|
|
run: .github/test.sh api
|
|
|
|
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
|
|
- uses: pnpm/action-setup@v4
|
|
- id: checkServices
|
|
run: pnpm i --frozen-lockfile && echo "service_list=$(node api/src/util/test-ci get-services)" >> "$GITHUB_OUTPUT"
|
|
|
|
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
|
|
- uses: pnpm/action-setup@v4
|
|
- run: pnpm i --frozen-lockfile && node api/src/util/test-ci run-tests-for ${{ matrix.service }} |