-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (43 loc) · 1.2 KB
/
tests.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
43
44
45
46
47
name: Tests
on:
push:
paths-ignore: ["**.md"]
pull_request:
paths-ignore: ["**.md"]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python: ["3.10", "3.x"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- uses: dioptra-io/setup-poetry-action@v1
- name: Install package
run: poetry install
- name: Run tests
run: sudo $(poetry env info -p)/bin/pytest --cov=fast_mda_traceroute --cov-report=xml
- uses: codecov/codecov-action@v2
docker:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dioptra-io/publish-docker-action@v1
with:
password: ${{ secrets.GITHUB_TOKEN }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' }}
pypi:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dioptra-io/publish-python-action@v1
with:
password: ${{ secrets.PYPI_TOKEN }}
upload: ${{ startsWith(github.ref, 'refs/tags/v') }}