Repository navigation
153 lines (136 loc) · 5.21 KB
/
Copy pathtests.yml
File metadata and controls
153 lines (136 loc) · 5.21 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: unit-tests
on:
push:
branches:
- "**"
pull_request:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
# Pin pip instead of taking whatever released most recently. Every job used to
# run `pip install --upgrade pip`, so each run resolved dependencies with a
# different, unannounced resolver: CI was non-reproducible by construction,
# and a pip release could break the build with no change in this repository.
#
# This does NOT prevent transient index failures, and should not be mistaken
# for a fix for one. A case is on record: the pull_request run for PR #14
# failed with `no matching distributions available for your environment:
# mdurl` while the identical commit had passed 15 minutes earlier on push,
# passed on two other platforms in that same run, and passed again on re-run
# with no code change. mdurl is a pure-Python py3-none-any wheel, so nothing
# about the environment made it uninstallable -- that was the index, not the
# resolver. The right response there is a re-run. The right response to an
# unpinned toolchain is this pin.
#
# Bump deliberately, as its own commit, so a resolver change lands where it
# can be attributed instead of appearing inside an unrelated PR.
PIP_VERSION: "26.2.1"
jobs:
wrapper-cross-platform:
name: wrapper-unit (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install the package and its declared dependencies
# rdflib is a required runtime dependency (see pyproject.toml) and the
# CLI imports it through the data-linking module while building its
# argument parser, so even `--help` needs it. Installing the project
# editable pulls exactly what pyproject declares and cannot drift from
# it, while tests still run against the checkout.
run: |
python -m pip install "pip==${{ env.PIP_VERSION }}"
python -m pip install -e .
- name: Run cross-platform wrapper tests (no real external tools)
run: python -m unittest -v test.test_vcf_rdfizer_cross_platform_unit
shell-posix:
name: shell+pipeline-unit (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- ubuntu-22.04
- macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install the package and its declared dependencies
# rdflib is a required runtime dependency (see pyproject.toml) and the
# CLI imports it through the data-linking module while building its
# argument parser, so even `--help` needs it. Installing the project
# editable pulls exactly what pyproject declares and cannot drift from
# it, while tests still run against the checkout.
run: |
python -m pip install "pip==${{ env.PIP_VERSION }}"
python -m pip install -e .
- name: Run full unit test suite
run: python -m unittest discover -s test -p "test_*_unit.py" -v
coverage:
name: coverage-upload
runs-on: ubuntu-latest
needs:
- wrapper-cross-platform
- shell-posix
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run coverage
run: |
python -m pip install "pip==${{ env.PIP_VERSION }}" coverage
python -m pip install -e .
python -m pip install pycottas==1.1.0 duckdb==1.5.5 pyarrow==22.0.0
coverage run -m unittest discover -s test -p "test_*_unit.py"
coverage run --append -m unittest test.test_cottas_tool
coverage xml -o coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
flags: unittests
name: vcf-rdfizer-unit-tests
fail_ci_if_error: false
package-smoke:
name: package-smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
needs:
- wrapper-cross-platform
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build + install wheel
run: |
python -m pip install "pip==${{ env.PIP_VERSION }}" build
python -m build
python -c "import glob,subprocess,sys; wheels=sorted(glob.glob('dist/*.whl')); wheels or (_ for _ in ()).throw(SystemExit('No wheel files found in dist/')); print(f'Installing wheel: {wheels[-1]}'); subprocess.check_call([sys.executable,'-m','pip','install',wheels[-1]])"
python -m vcf_rdfizer --help