-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 881 Bytes
/
build.yml
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
name: CI
on:
- push
- workflow_call
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.11
cache: true
- name: Install dependencies
run: pdm install -G test
- name: Test with pytest
run: pdm run pytest --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
flags: build
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build a binary wheel and a source tarball
run: pdm build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/