-
Notifications
You must be signed in to change notification settings - Fork 79
116 lines (112 loc) · 3.68 KB
/
test.yml
File metadata and controls
116 lines (112 loc) · 3.68 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
name: tests
on:
push:
branches: [ master ]
tags-ignore: '**'
pull_request:
types: [opened, synchronize]
branches: [ master ]
jobs:
test:
runs-on: ${{ matrix.os }}
env:
REFINERY_STOREPATH: ${{ github.workspace }}/refinery-test-data
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.13']
os: [windows-latest, macos-15-intel, ubuntu-latest]
steps:
- name: Debug Logging
run: |
echo "event = ${{ github.event_name }}"
echo "action = ${{ github.event.action }}"
- name: Checkout Main Repository
uses: actions/checkout@v5
if: ${{ github.event_name != 'pull_request' && github.event_name != 'pull_request_target' }}
- name: Clone PR Source Repository
uses: actions/checkout@v5
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Checkout Test Data
uses: actions/checkout@v5
with:
repository: binref/refinery-test-data
path: refinery-test-data
- name: Install Dependencies
uses: ./.github/actions/setup/
with:
py: ${{ matrix.python-version }}
os: ${{ matrix.os }}
- name: Run Tests
uses: ./.github/actions/test/
with:
py: ${{ matrix.python-version }}
os: ${{ matrix.os }}
audit:
name: audit dependencies
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.13']
os: [windows-latest, macos-15-intel, ubuntu-latest]
steps:
- name: Checkout Main Repository
uses: actions/checkout@v5
if: ${{ github.event_name != 'pull_request' && github.event_name != 'pull_request_target' }}
- name: Clone PR Source Repository
uses: actions/checkout@v5
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install Dependencies
uses: ./.github/actions/setup/
with:
py: ${{ matrix.python-version }}
os: ${{ matrix.os }}
- name: Audit Dependencies
uses: pypa/gh-action-pip-audit@v1.1.0
with:
ignore-vulns: |
GHSA-4xh5-x5gv-qwph # pip; independent of refinery
CVE-2026-4539 # pygments bug we won't trigger
coverage:
if: ${{ github.repository_owner == 'binref' }}
runs-on: windows-latest
needs:
- test
- audit
env:
REFINERY_STOREPATH: ${{ github.workspace }}/refinery-test-data
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Checkout Test Data
uses: actions/checkout@v5
with:
repository: binref/refinery-test-data
path: refinery-test-data
- name: Install Dependencies
uses: ./.github/actions/setup/
with:
py: '3.13'
os: windows-latest
- name: Install Coverage Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
- name: Run tests and collect coverage
run: pytest --disable-warnings --cov-config=.coveragerc --cov refinery -n=8 test 2>nul
shell: cmd
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true