mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-19 21:37:31 +08:00
include unit test in the workflow
This commit is contained in:
parent
bc71d74aea
commit
565fc013fc
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: Build + CI
|
||||
name: Unittest and Build + CI
|
||||
|
||||
# Triggers: Equivalent to ADO trigger block
|
||||
on:
|
||||
@ -12,9 +12,22 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
run_backend_unittests:
|
||||
name: Run Backend unit tests
|
||||
permissions:
|
||||
checks: write
|
||||
# Call the reusable workflow for unit tests
|
||||
uses: ./.github/workflows/template_unit_pytest.yml
|
||||
# Pass parameters as inputs to the reusable workflow
|
||||
with:
|
||||
projectName: Backend # Value defined in original variables
|
||||
workingDir: app/backend
|
||||
testsFolderName: tests
|
||||
# secrets: inherit # Inherit secrets from the parent workflow
|
||||
|
||||
# This job defines the matrix and calls the reusable workflow for each image build
|
||||
build:
|
||||
needs: run_backend_tests
|
||||
needs: run_backend_unittests
|
||||
name: Build ${{ matrix.image_config.IMAGE_NAME }}
|
||||
# Define necessary permissions if needed (e.g., for GitHub Packages)
|
||||
permissions:
|
||||
|
||||
21
.github/workflows/unittest_backend.yml
vendored
21
.github/workflows/unittest_backend.yml
vendored
@ -1,21 +0,0 @@
|
||||
name: Unit Tests - Backend
|
||||
|
||||
# Triggers: Equivalent to ADO trigger block
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
|
||||
jobs:
|
||||
run_backend_tests:
|
||||
name: Run Backend unit tests
|
||||
permissions:
|
||||
checks: write
|
||||
uses: ./.github/workflows/template_unit_pytest.yml
|
||||
# Pass parameters as inputs to the reusable workflow
|
||||
with:
|
||||
projectName: Backend # Value defined in original variables
|
||||
workingDir: app/backend
|
||||
testsFolderName: tests
|
||||
# secrets: inherit # Inherit secrets from the parent workflow
|
||||
Loading…
x
Reference in New Issue
Block a user