-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (34 loc) · 1 KB
/
python-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
42
on: [workflow_dispatch]
jobs:
build:
name: Build Package
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set environment variables
id: set_env_variables
run: |
echo "PYTHONPATH=." >> "$GITHUB_ENV"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install -r requirements.txt
- name: Test with pytest
run: |
pip install pytest
pytest test/ --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.python-version }}
path: |
junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}