-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (52 loc) · 1.67 KB
/
test.yml
File metadata and controls
63 lines (52 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Testing
on:
workflow_call:
inputs:
ref:
required: true
type: string
defaults:
run:
working-directory: ./
jobs:
app-testing:
runs-on: ubuntu-latest
name: Run Tests
steps:
- name: Harden runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ inputs.ref }}
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.10"
- name: Install dependencies
run: uv sync --group dev --frozen
- name: Run Tests
run: uv run pytest --junitxml=build/reports/junit.xml
- name: Generate coverage report
uses: mridang/action-test-reporter@v3
if: always()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
coverage-file: 'build/coverage/clover.xml'
- name: Upload Results
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: test-results
path: build/reports/junit.xml
- name: Generate Report
if: ${{ always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
uses: dorny/test-reporter@3d76b34a4535afbd0600d347b09a6ee5deb3ed7f # v2.6.0
with:
name: Tests
path: build/reports/junit.xml
reporter: java-junit
fail-on-error: 'false'
token: ${{ secrets.GITHUB_TOKEN }}