-
Notifications
You must be signed in to change notification settings - Fork 29
77 lines (77 loc) · 1.85 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build
run-name: Build
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- 3.9.6
- 3.9.8
- 3.9.9
- 3.9.10
- 3.9.11
- 3.9.12
- 3.9.13
- 3.9.16
- 3.10.0
- 3.10.1
- 3.10.2
- 3.10.3
- 3.10.4
- 3.10.10
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
- run: make setup
- run: make test
- run: make coverage
release:
# if: github.ref == 'refs/heads/master'
needs: test
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v4
with:
python-version: "3.9.6"
- name: setup pypi
run: |
echo "[pypi]" >> ~/.pypirc
echo "username=__token__" >> ~/.pypirc
echo "password=${{ secrets.PYPI_TOKEN }}" >> ~/.pypirc
- name: release
run: |
python3 -m pip install --upgrade twine
make build
python3 -m twine upload --repository pypi dist/*
echo "deployed to pypi"
docs-build-deploy:
# if: github.ref == 'refs/heads/master'
# needs: release
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/ssh-agent
with:
write_github_ssh_key: ${{ secrets.WRITE_GITHUB_SSH_KEY }}
- uses: actions/setup-python@v4
with:
python-version: "3.9.6"
cache: 'pipenv'
- run: make setup
- run: |
git config --local user.email "[email protected]"
git config --local user.name "gh-pages deploy bot"
make gh-pages