try if status check needs to be a job or can be a step

This commit is contained in:
einhornimmond 2025-05-04 10:54:52 +02:00
parent 17637960e4
commit 2783f1aca6
4 changed files with 10 additions and 34 deletions

View File

@ -16,11 +16,7 @@ jobs:
run: biome ci ./config-schema
- name: Lint - Backend
run: biome ci ./backend
- name: Lint - Frontend
run: biome ci ./frontend
- name: Lint - Admin
run: biome ci ./admin
- name: Lint - Database
- name: Lint - Database Up
run: biome ci ./database
- name: Lint - DHT Node
run: biome ci ./dht-node

View File

@ -40,8 +40,6 @@ jobs:
name: Unit tests - Backend
needs: files-changed
runs-on: ubuntu-latest
outputs:
test-success: ${{ steps.test.outputs.success }}
steps:
- name: Set Node.js version
uses: actions/setup-node@v4
@ -63,29 +61,11 @@ jobs:
- name: install dependencies
run: cd out && yarn install --frozen-lockfile --production=false
- name: Locales - Backend
run: cd out && yarn locales
- name: Wait for MariaDB to be ready
run: docker run --rm --network gradido_internal-net busybox sh -c 'until nc -z mariadb 3306; do echo waiting for db; sleep 1; done;'
- name: Backend | Unit tests
id: test
run: |
cd out && turbo backend#lint backend#test backend#build backend#typecheck
echo "success=$([ $? -eq 0 ] && echo true || echo false)" >> $GITHUB_OUTPUT
lint:
if: needs.files-changed.outputs.backend == 'true'
name: Lint - Backend
needs: [files-changed, unit_test]
runs-on: ubuntu-latest
steps:
- name: Check result from previous step
run: if [ "${{ needs.unit_test.outputs.test-success }}" != "true" ]; then exit 1; fi
locales:
if: needs.files-changed.outputs.backend == 'true'
name: Locales - Backend
needs: [files-changed, unit_test]
runs-on: ubuntu-latest
steps:
- name: Check result from previous step
run: if [ "${{ needs.unit_test.outputs.test-success }}" != "true" ]; then exit 1; fi
run: cd out && turbo backend#test backend#build backend#typecheck

View File

@ -21,7 +21,7 @@ jobs:
list-files: shell
build:
name: typecheck and lint - Config-Schema
name: typecheck - Config-Schema
if: needs.files-changed.outputs.config == 'true' || needs.files-changed.outputs.docker-compose == 'true'
needs: files-changed
runs-on: ubuntu-latest
@ -38,6 +38,6 @@ jobs:
- name: install dependencies
run: cd out && yarn install --frozen-lockfile --production=false
- name: typecheck and lint
run: cd out && turbo typecheck lint
- name: typecheck
run: cd out && turbo typecheck

View File

@ -81,5 +81,5 @@ jobs:
- name: install dependencies
run: cd out && yarn install --frozen-lockfile --production=false
- name: Database | Lint
run: cd out && turbo lint build typecheck
- name: Database
run: cd out && turbo build typecheck