try out slightly improvements

This commit is contained in:
einhornimmond 2025-05-04 15:07:44 +02:00
parent 6d45d62c0b
commit 818ab59f70
5 changed files with 41 additions and 33 deletions

View File

@ -52,19 +52,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Install turbo
run: yarn global add turbo@^2
- name: Prune admin with turbos help
run: turbo prune admin
- name: install bun
uses: oven-sh/setup-bun@v2
- name: install dependencies
run: cd out && yarn install --frozen-lockfile --production=false
run: bun install --frozen-lockfile
- name: Admin Interface | Unit tests
id: test
run: |
cd out && turbo admin#test admin#lint
bun turbo admin#test admin#lint
echo "success=$([ $? -eq 0 ] && echo true || echo false)" >> $GITHUB_OUTPUT
lint:

View File

@ -59,7 +59,7 @@ jobs:
run: bun install --frozen-lockfile
- 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;'
run: until nc -z localhost 3306; do echo waiting for db; sleep 1; done;
- name: Backend | Unit tests
run: bun turbo backend#test

View File

@ -61,8 +61,8 @@ jobs:
run: cd out && yarn install --frozen-lockfile --production=false
- 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;'
run: until nc -z localhost 3306; do echo waiting for db; sleep 1; done;
- name: run unit test & lint & build & typecheck
run: cd out && turbo dht-node#lint dht-node#test dht-node#build dht-node#typecheck
- name: run unit test & build & typecheck
run: cd out && turbo dht-node#test dht-node#build dht-node#typecheck

View File

@ -61,8 +61,8 @@ jobs:
run: cd out && yarn install --frozen-lockfile --production=false
- 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;'
run: until nc -z localhost 3306; do echo waiting for db; sleep 1; done;
- name: Federation | Unit tests
id: test
run: cd out && turbo federation#lint federation#test federation#build federation#typecheck
run: cd out && turbo federation#test federation#build federation#typecheck

View File

@ -41,8 +41,6 @@ jobs:
name: Unit Tests - Frontend
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
@ -50,40 +48,53 @@ jobs:
node-version: '18.20.7'
- name: Checkout code
uses: actions/checkout@v3
- name: Install turbo
run: yarn global add turbo@^2
- name: Prune frontend with turbos help
run: turbo prune frontend
uses: actions/checkout@v4
- name: install bun
uses: oven-sh/setup-bun@v2
- name: install dependencies
run: cd out && yarn install --frozen-lockfile --production=false
run: bun install --frozen-lockfile
- name: Frontend | Unit tests
id: test
run: |
cd out && turbo frontend#test frontend#lint
echo "success=$([ $? -eq 0 ] && echo true || echo false)" >> $GITHUB_OUTPUT
run: bun turbo frontend#test
lint:
if: needs.files-changed.outputs.frontend == 'true'
if: needs.files-changed.outputs.config == 'true' || needs.files-changed.outputs.frontend == 'true'
name: Lint - Frontend
needs: [files-changed, unit_test]
needs: files-changed
runs-on: ubuntu-latest
outputs:
success: ${{ steps.lint.outputs.success }}
steps:
- name: Check result from previous step
run: if [ "${{ needs.unit_test.outputs.test-success }}" != "true" ]; then exit 1; fi
- name: Set Node.js version
uses: actions/setup-node@v4
with:
node-version: '18.20.7'
- name: Checkout code
uses: actions/checkout@v4
- name: install bun
uses: oven-sh/setup-bun@v2
- name: install dependencies
run: bun install --frozen-lockfile
- name: Frontend | Lint
id: lint
run: |
bun turbo frontend#lint
echo "success=$([ $? -eq 0 ] && echo true || echo false)" >> $GITHUB_OUTPUT
stylelint:
if: needs.files-changed.outputs.frontend == 'true'
name: Stylelint - Frontend
needs: [files-changed, unit_test]
needs: [files-changed, lint]
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: if [ "${{ needs.lint.outputs.success }}" != "true" ]; then exit 1; fi
locales:
if: needs.files-changed.outputs.frontend == 'true'