-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 958 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
name: build
on:
push:
branches:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: python -m pip install .[test] --upgrade pip --no-cache-dir
- name: Test with pytest
run: pytest # --cov=./ --cov-report=xml
# repository > settings > github apps > configure codecov
# - name: Build package distribution
# if: startsWith(github.ref, 'refs/tags')
# run: |
# python -m pip install build
# python -m build --sdist --wheel --outdir dist/ .
# - name: Publish package distribution to PyPI
# if: startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@master
# with:
# skip_existing: true
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}