-
Notifications
You must be signed in to change notification settings - Fork 11
45 lines (37 loc) · 1.35 KB
/
build-python.yaml
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
name: Build, Test and Publish Python
on: [workflow_call]
jobs:
build-python:
strategy:
matrix:
os: ["ubuntu-latest"]
python: ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Set up Poetry
uses: ./.github/actions/setup-poetry
- name: Install dependencies
run: poetry install --no-interaction
- name: pytest + coverage
shell: bash
run: |
set -o pipefail
pipx install algokit
algokit localnet start
poetry run pytest -n auto --junitxml=pytest-junit.xml --cov-report=term-missing:skip-covered --cov=src | tee pytest-coverage.txt
algokit localnet stop
- name: pytest coverage comment - using Python 3.10 on ubuntu-latest
if: matrix.python == '3.10' && matrix.os == 'ubuntu-latest'
uses: MishaKav/pytest-coverage-comment@main
continue-on-error: true # forks fail to add a comment, so continue any way
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest-junit.xml
- name: Build Wheel
run: poetry build --format wheel