mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-02 07:04:27 +02:00
test: run service tests only when api/packages change
This commit is contained in:
parent
7f94c73e6a
commit
08c34762e9
33
.github/workflows/test-services.yml
vendored
Normal file
33
.github/workflows/test-services.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Run service tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- api/**
|
||||||
|
- packages/**
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-services:
|
||||||
|
name: test service functionality
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
services: ${{ steps.checkServices.outputs.service_list }}
|
||||||
|
steps:
|
||||||
|
- 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:
|
||||||
|
- 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 }}
|
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
@ -32,27 +32,3 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
- run: .github/test.sh api
|
- run: .github/test.sh api
|
||||||
|
|
||||||
check-services:
|
|
||||||
name: test service functionality
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
services: ${{ steps.checkServices.outputs.service_list }}
|
|
||||||
steps:
|
|
||||||
- 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:
|
|
||||||
- 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 }}
|
|
Loading…
x
Reference in New Issue
Block a user