-
Notifications
You must be signed in to change notification settings - Fork 10
132 lines (116 loc) · 3.34 KB
/
Copy pathci-tests.yml
File metadata and controls
132 lines (116 loc) · 3.34 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Unit Tests
on:
push:
branches: [ main, develop ]
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- 'requirements*.txt'
- 'uv.lock'
- 'pytest.ini'
- '.github/workflows/ci-tests.yml'
pull_request:
branches: [ main, develop ]
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- 'requirements*.txt'
- 'uv.lock'
- 'pytest.ini'
- '.github/workflows/ci-tests.yml'
schedule:
- cron: '0 2 * * *'
permissions:
contents: read
jobs:
config:
name: Configuration
uses: ./.github/workflows/shared-config.yml
setup-cache:
name: Setup Test Cache
needs: config
uses: ./.github/workflows/cache-management.yml
with:
cache-type: dependencies
cache-key-base: test-deps
python-version: ${{ needs.config.outputs.default-python-version }}
tests:
name: Unit Tests (Default Python)
needs: [config, setup-cache]
uses: ./.github/workflows/reusable-test.yml
with:
test-type: unit
python-version: ${{ needs.config.outputs.default-python-version }}
default-python-version: ${{ needs.config.outputs.default-python-version }}
continue-on-error: true # TODO: Remove once tests are stable
aws-region: ${{ needs.config.outputs.aws-region }}
aws-access-key: ${{ needs.config.outputs.aws-access-key }}
aws-secret-key: ${{ needs.config.outputs.aws-secret-key }}
environment: ${{ needs.config.outputs.environment }}
testing-flag: ${{ needs.config.outputs.testing-flag }}
build-and-package:
name: Build & Package
runs-on: ubuntu-latest
needs: [config, setup-cache]
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v6.0.1
- name: Setup UV with cache
uses: ./.github/actions/setup-uv-cached
with:
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
fail-on-cache-miss: false
- name: Build package
run: make build
- name: Upload build artifacts
uses: actions/upload-artifact@v6
with:
name: build-artifacts-${{ needs.config.outputs.package-version }}
retention-days: 60
path: |
dist/
build/
test-report:
name: Generate Test Report
runs-on: ubuntu-latest
needs: [config, setup-cache, tests]
if: always()
permissions:
contents: read
issues: read
checks: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v6.0.1
- name: Setup UV with cache
uses: ./.github/actions/setup-uv-cached
with:
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
fail-on-cache-miss: false
- name: Download test results
uses: actions/download-artifact@v7
with:
path: test-results/
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
continue-on-error: true
with:
files: "test-results/**/*.xml"
check_name: "Test Results Summary"
comment_mode: "always"
job_summary: true
action_fail: false
fail_on: "nothing"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: always()
with:
files: test-results/**/*coverage*.xml
flags: unit
name: unit-tests