-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (68 loc) · 2.56 KB
/
Copy pathpython-tests.yml
File metadata and controls
81 lines (68 loc) · 2.56 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
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json
name: "Python Tests"
run-name: "Python Tests • ${{ github.ref_name }} @${{ github.actor }}"
on:
pull_request:
push:
branches:
- "main"
workflow_dispatch:
defaults:
run:
shell: "bash"
permissions:
contents: "read"
concurrency:
group: "python-tests-${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
python:
name: "Python tests"
runs-on: "ubuntu-latest"
timeout-minutes: 10
permissions:
contents: "read"
id-token: "write"
steps:
- name: "Harden Runner"
uses: "step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c" # v2.21.0
with:
egress-policy: "audit"
- name: "Checkout repository"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
- name: "Setup Python"
uses: "actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97" # v7.0.0
with:
python-version: "3.14"
cache: "pip"
cache-dependency-path: "requirements-dev.txt"
- name: "Install Python dependencies"
run: "python -m pip install -r requirements-dev.txt"
- name: "Run coverage tests"
run: "npm run test:python:coverage"
- name: "Upload test results to Codecov"
if: "${{ !cancelled() }}"
uses: "codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f" # v7.0.0
with:
use_oidc: true
slug: "${{ github.repository }}"
files: "test-report.junit.xml"
flags: "python"
name: "python-junit"
report_type: "test_results"
fail_ci_if_error: true
disable_search: true
verbose: true
- name: "Upload coverage to Codecov"
if: "${{ !cancelled() }}"
uses: "codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f" # v7.0.0
with:
use_oidc: true
slug: "${{ github.repository }}"
files: "coverage.xml"
flags: "python"
name: "python-coverage"
report_type: "coverage"
fail_ci_if_error: true
disable_search: true
verbose: true