@@ -40,12 +40,74 @@ jobs:
4040 with :
4141 path : bsmschema
4242 attest-build-provenance-github : ${{ github.event_name != 'pull_request' }}
43+ - name : Upload uv.lock
44+ uses : actions/upload-artifact@v4
45+ with :
46+ name : Lockfile
47+ path : |
48+ uv.lock
49+ pyproject.toml
50+
51+ test :
52+ runs-on : ${{ matrix.os }}
53+ needs : [build]
54+ strategy :
55+ matrix :
56+ os : ['ubuntu-latest']
57+ source : ['repo', 'sdist']
58+ fail-fast : false
59+
60+ env :
61+ DEPENDS : ${{ matrix.dependencies }}
62+
63+ steps :
64+ - uses : actions/checkout@v4
65+ if : matrix.source == 'repo'
66+ with :
67+ submodules : recursive
68+ fetch-depth : 0
69+ - name : Download packages built by build-and-inspect-python-package
70+ if : matrix.source == 'sdist'
71+ uses : actions/download-artifact@v4
72+ with :
73+ name : Packages
74+ path : dist
75+ - name : Download lockfile
76+ if : matrix.source == 'sdist'
77+ uses : actions/download-artifact@v4
78+ with :
79+ name : Lockfile
80+ - name : Extract sdist
81+ if : matrix.source == 'sdist'
82+ run : |
83+ ls -lR
84+ mkdir -p bsmschema
85+ tar --strip-components=1 -C bsmschema -xzf dist/*.tar.gz
86+ ls -lR
87+ - name : Set up uv
88+ uses : astral-sh/setup-uv@v6
89+ - name : Install tox and coverage
90+ run : |
91+ uv tool install tox --with=tox-uv
92+ uv tool install coverage[toml]
93+ - name : Run tox
94+ run : tox run-parallel -c bsmschema/tox.ini --exit-and-dump-after 60
95+ - name : Combine coverage
96+ run : |
97+ coverage combine
98+ coverage xml
99+ working-directory : bsmschema
100+ - name : Upload coverage reports to Codecov
101+ uses : codecov/codecov-action@v5
102+ with :
103+ token : ${{ secrets.CODECOV_TOKEN }}
104+ working-directory : bsmschema
43105
44106 publish :
45107 name : Publish package to PyPI
46108 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
47109 runs-on : ubuntu-latest
48- needs : [build]
110+ needs : [build, test ]
49111 permissions :
50112 attestations : write
51113 id-token : write
0 commit comments