Lets try this way

This commit is contained in:
Trenton H 2025-03-05 13:39:10 -08:00
parent 681d49fb73
commit 67e4214c23

View File

@ -162,8 +162,8 @@ jobs:
--frozen \ --frozen \
pytest pytest
- -
name: Upload test results artifact name: Upload test results
if: ${{ matrix.python-version == env.DEFAULT_PYTHON_VERSION }} if: ${{ always() && matrix.python-version == env.DEFAULT_PYTHON_VERSION }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: backend-test-results name: backend-test-results
@ -171,13 +171,14 @@ jobs:
retention-days: 7 retention-days: 7
if-no-files-found: error if-no-files-found: error
- -
name: Upload coverage artifact name: Upload test coverage
if: ${{ matrix.python-version == env.DEFAULT_PYTHON_VERSION }} if: ${{ matrix.python-version == env.DEFAULT_PYTHON_VERSION }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: backend-coverage-report name: backend-coverage-report
path: coverage.xml path: coverage.xml
retention-days: 7 retention-days: 7
if-no-files-found: error
- -
name: Stop containers name: Stop containers
if: always() if: always()
@ -185,7 +186,7 @@ jobs:
docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml logs docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml logs
docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml down docker compose --file ${{ github.workspace }}/docker/compose/docker-compose.ci-test.yml down
install-frontend-depedendencies: install-frontend-dependencies:
name: "Install Frontend Dependencies" name: "Install Frontend Dependencies"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
needs: needs:
@ -220,7 +221,7 @@ jobs:
name: "Frontend Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})" name: "Frontend Tests (Node ${{ matrix.node-version }} - ${{ matrix.shard-index }}/${{ matrix.shard-count }})"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
needs: needs:
- install-frontend-depedendencies - install-frontend-dependencies
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -286,14 +287,17 @@ jobs:
path: src-ui/junit-report-${{ matrix.shard-index }}.xml path: src-ui/junit-report-${{ matrix.shard-index }}.xml
retention-days: 7 retention-days: 7
tests-upload: tests-data-upload:
name: "Upload test results to Codecov" name: "Upload test status to Codecov"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
needs: needs:
- tests-backend - tests-backend
- tests-frontend - tests-frontend
steps: steps:
-
uses: actions/checkout@v4
# Results
- -
name: Download frontend test results name: Download frontend test results
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@ -310,28 +314,20 @@ jobs:
flags: frontend flags: frontend
directory: src-ui/junit/ directory: src-ui/junit/
- -
name: Download backend test results name: Download backend coverage
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: backend-test-results name: backend-test-results
path: src/ path: src/
- -
name: Upload backend test results to Codecov name: Upload backend test results to Codecov
uses: codecov/test-results-action@v1 uses: codecov/test-results-action@v1
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
flags: backend flags: backend
directory: src/ directory: src/
# Coverage
tests-coverage-upload:
name: "Upload coverage to Codecov"
runs-on: ubuntu-24.04
needs:
- tests-backend
- tests-frontend
steps:
-
uses: actions/checkout@v4
- -
name: Download frontend jest coverage name: Download frontend jest coverage
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@ -349,7 +345,6 @@ jobs:
name: Upload frontend coverage to Codecov name: Upload frontend coverage to Codecov
uses: codecov/codecov-action@v5 uses: codecov/codecov-action@v5
with: with:
# not required for public repos, but intermittently fails otherwise
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
flags: frontend flags: frontend
directory: src-ui/coverage/ directory: src-ui/coverage/
@ -365,11 +360,11 @@ jobs:
name: Upload coverage to Codecov name: Upload coverage to Codecov
uses: codecov/codecov-action@v5 uses: codecov/codecov-action@v5
with: with:
# not required for public repos, but intermittently fails otherwise
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
# future expansion # future expansion
flags: backend flags: backend
directory: src/ directory: src/
# Bundle analysis
- -
name: Use Node.js 20 name: Use Node.js 20
uses: actions/setup-node@v4 uses: actions/setup-node@v4