-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.18 KB
/
ci.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
48
49
50
51
name: build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: |
pip install flake8
flake8 pytest_automock tests
tests:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
env:
COV_CORE_SOURCE: pytest_automock
COV_CORE_CONFIG: .coveragerc
COV_CORE_DATAFILE: .coverage.eager
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: |
pip install -e ./[dev]
pytest
- uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
deploy:
needs: tests
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: casperdcl/deploy-pypi@v2
with:
password: ${{ secrets.PYPI_TOKEN }}
build: true
skip_existing: true