mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
68 lines
2.1 KiB
YAML
68 lines
2.1 KiB
YAML
name: Gradido Admin Interface Test CI
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
# only (but most important) job from this workflow required for pull requests
|
|
# check results serve as run conditions for all other jobs here
|
|
files-changed:
|
|
name: Detect File Changes - Admin Interface
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
admin: ${{ steps.changes.outputs.admin }}
|
|
config: ${{ steps.changes.outputs.config }}
|
|
steps:
|
|
- uses: actions/checkout@v3.3.0
|
|
|
|
- name: Check for admin interface file changes
|
|
uses: dorny/paths-filter@v2.11.1
|
|
id: changes
|
|
with:
|
|
token: ${{ github.token }}
|
|
filters: .github/file-filters.yml
|
|
list-files: shell
|
|
|
|
|
|
build_test:
|
|
if: needs.files-changed.outputs.config == 'true' || needs.files-changed.outputs.admin == 'true'
|
|
name: Docker Build Test - Admin Interface
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Admin Interface | Build 'test' image
|
|
run: docker build -f ./admin/Dockerfile --target production -t "gradido/admin:production" --build-arg NODE_ENV="production" --build-arg BUILD_COMMIT=$(git rev-parse HEAD) --build-arg BUILD_COMMIT_SHORT=$(git rev-parse --short HEAD) .
|
|
|
|
unit_test_lint:
|
|
if: needs.files-changed.outputs.config == 'true' || needs.files-changed.outputs.admin == 'true'
|
|
name: Unit Tests & Lint & Stylelint & Locales - Admin Interface
|
|
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
|
|
with:
|
|
node-version: '18.20.7'
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version-file: '.bun-version'
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
bun install --filter admin --frozen-lockfile
|
|
bun install --global --no-save turbo@^2
|
|
|
|
- name: Admin Interface | Unit tests
|
|
id: test
|
|
run: |
|
|
turbo admin#test admin#lint admin#locales |