-
Notifications
You must be signed in to change notification settings - Fork 2
100 lines (86 loc) 路 3.22 KB
/
Copy path_test.yml
File metadata and controls
100 lines (86 loc) 路 3.22 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
name: "> Test"
on:
workflow_call:
secrets:
SONAR_TOKEN:
required: true
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
permissions:
attestations: write
checks: write
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Setup Dev Environment
uses: ./.github/actions/setup-dev-env
- name: Release version check
if: startsWith(github.ref, 'refs/tags/v')
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
TOML_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
if [ "$TAG_VERSION" != "$TOML_VERSION" ]; then
echo "Release version mismatch: Tag $TAG_VERSION != pyproject.toml $TOML_VERSION"
exit 1
fi
- name: Print development version info
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
TOML_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
echo "Development build - Current version in pyproject.toml: $TOML_VERSION"
- name: Test / Unit
uses: ./.github/actions/run-tests
with:
test-type: unit
mise-task: test:unit
skip-marker: skip:test:unit
commit-message: ${{ github.event.head_commit.message }}
- name: Test / Integration
uses: ./.github/actions/run-tests
with:
test-type: integration
mise-task: test:integration
skip-marker: skip:test:integration
commit-message: ${{ github.event.head_commit.message }}
- name: Test / E2E
uses: ./.github/actions/run-tests
with:
test-type: e2e
mise-task: test:e2e
skip-marker: skip:test:e2e
commit-message: ${{ github.event.head_commit.message }}
- name: Test / Unit (lowest-direct)
uses: ./.github/actions/run-tests
with:
test-type: unit
mise-task: test:lowest_direct
skip-marker: skip:test:lowest-direct
commit-message: ${{ github.event.head_commit.message }}
- name: Test / Unit (all supported Python versions)
uses: ./.github/actions/run-tests
with:
test-type: unit
mise-task: test:python_versions
skip-marker: skip:test:python-versions
commit-message: ${{ github.event.head_commit.message }}
- name: Publish test results
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0
if: ${{ !cancelled() && (env.GITHUB_WORKFLOW_RUNTIME != 'ACT') }}
with:
name: Test Results
path: reports/junit*.xml
reporter: java-junit
- name: SonarQube Scan
if: ${{ !cancelled() && (env.GITHUB_WORKFLOW_RUNTIME != 'ACT') }}
uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8.2.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}