-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (25 loc) · 777 Bytes
/
Copy pathtests.yml
File metadata and controls
36 lines (25 loc) · 777 Bytes
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
name: Tests
on: [ push, pull_request ]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
FORCE_COLOR: '1'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Pip dependencies
run: pipx install hatch
- name: Run Tests
run: hatch run test
- name: Build package archive
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: hatch build
- name: Publish to PyPi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: hatch publish --user '__token__' --auth '${{ secrets.PYPI_API_TOKEN }}'