|
47 | 47 | with:
|
48 | 48 | code_dir: "webapp/backend"
|
49 | 49 | test_dir: "tests/backend"
|
50 |
| - |
51 |
| - - name: Update coverage badge in README |
52 |
| - uses: ./.github/actions/coverage_badge |
53 |
| - with: |
54 |
| - coverage_file: "artifacts/coverage-results-txt/pytest-coverage.txt" |
55 |
| - badge_title: "backend" |
| 50 | + artifact_prefix: "backend" |
56 | 51 |
|
57 | 52 | build-and-test-simlab:
|
58 | 53 | name: "Build and Test SimLab"
|
|
69 | 64 | with:
|
70 | 65 | code_dir: "simlab"
|
71 | 66 | test_dir: "tests/simlab"
|
| 67 | + artifact_prefix: "simlab" |
| 68 | + |
| 69 | + update-coverage-badges: |
| 70 | + name: "Update Coverage Badges in README" |
| 71 | + runs-on: ubuntu-latest |
| 72 | + needs: [build-and-test-backend, build-and-test-simlab] |
| 73 | + timeout-minutes: 5 |
| 74 | + |
| 75 | + steps: |
| 76 | + - name: Checkout Repository |
| 77 | + uses: actions/checkout@v3 |
72 | 78 |
|
73 |
| - - name: Update coverage badge in README |
| 79 | + - name: Download Backend Coverage Results |
| 80 | + uses: actions/download-artifact@v4 |
| 81 | + with: |
| 82 | + name: backend-coverage-results-txt |
| 83 | + path: artifacts/backend_coverage |
| 84 | + |
| 85 | + - name: Download SimLab Coverage Results |
| 86 | + uses: actions/download-artifact@v4 |
| 87 | + with: |
| 88 | + name: simlab-coverage-results-txt |
| 89 | + path: artifacts/simlab_coverage |
| 90 | + |
| 91 | + - name: Update Coverage Backend Badge |
74 | 92 | uses: ./.github/actions/coverage_badge
|
75 | 93 | with:
|
76 |
| - coverage_file: "artifacts/coverage-results-txt/pytest-coverage.txt" |
| 94 | + coverage_file: "artifacts/backend_coverage/pytest-coverage.txt" |
| 95 | + badge_title: "backend" |
| 96 | + |
| 97 | + - name: Update Coverage SimLab Badge |
| 98 | + uses: ./.github/actions/coverage_badge |
| 99 | + with: |
| 100 | + coverage_file: "artifacts/simlab_coverage/pytest-coverage.txt" |
77 | 101 | badge_title: "simlab"
|
| 102 | + |
| 103 | + - name: Commit Updated README.md |
| 104 | + shell: bash |
| 105 | + run: | |
| 106 | + git config --local user.name "github-actions[bot]" |
| 107 | + git config --local user.email "github-actions[bot]@users.noreply.github.com" |
| 108 | + git add README.md |
| 109 | + git commit -m "Update coverage badge in README" |
| 110 | + git push |
0 commit comments