File tree Expand file tree Collapse file tree 2 files changed +60
-4
lines changed Expand file tree Collapse file tree 2 files changed +60
-4
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : Code CI
3
+
4
+ on :
5
+ push :
6
+ pull_request :
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ strategy :
12
+ fail-fast : false
13
+ matrix :
14
+ python : ["3.7", "3.8", "3.9"]
15
+
16
+ steps :
17
+ - name : Checkout Source
18
+ uses : actions/checkout@v2
19
+
20
+ - name : Set up Python ${{ matrix.python }}
21
+ uses : actions/setup-python@v2
22
+ with :
23
+ python-version : ${{ matrix.python }}
24
+
25
+ - name : Install Python Dependencies
26
+ run : |
27
+ pip install pipenv twine
28
+ pipenv install --dev --deploy --python $(which python) && pipenv graph
29
+
30
+ - name : Check wheel version is specified
31
+ run : grep '"wheel":' Pipfile.lock
32
+
33
+ - name : Create Sdist and Wheel
34
+ # for reproducible builds set SOURCE_DATE_EPOCH to the date of the last commit
35
+ # See here for more info : https://reproducible-builds.org/
36
+ run : |
37
+ export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
38
+ pipenv run build
39
+
40
+ - name : Run Tests
41
+ run : pipenv run tests
42
+
43
+ - name : Publish Sdist and Wheel to PyPI
44
+ # Only once when on a tag
45
+ if : matrix.python == '3.7' && startsWith(github.ref, 'refs/tags')
46
+ env :
47
+ TWINE_USERNAME : __token__
48
+ TWINE_PASSWORD : ${{ secrets.pypi_token }}
49
+ run : twine upload dist/*
50
+
51
+ - name : Upload coverage to Codecov
52
+ uses : codecov/codecov-action@v1
53
+ with :
54
+ name : ${{ matrix.python }}
55
+ files : cov.xml
56
+
Original file line number Diff line number Diff line change @@ -48,17 +48,17 @@ jobs:
48
48
path : build/html
49
49
50
50
- name : Maybe use sphinx-multiversion
51
- # If we are building master or a tag we will publish
52
- if : github.ref == 'refs/heads/master ' || startsWith(github.ref, 'refs/tags')
51
+ # If we are building main or a tag we will publish
52
+ if : github.ref == 'refs/heads/main ' || startsWith(github.ref, 'refs/tags')
53
53
# So use the args we normally pass to sphinx-build, but run sphinx-multiversion
54
54
run : mv $(pipenv --venv)/bin/sphinx-multiversion $(pipenv --venv)/bin/sphinx-build
55
55
56
56
- name : Build Docs
57
57
run : pipenv run docs
58
58
59
59
- name : Publish Docs to gh-pages
60
- # Only master and tags are published
61
- if : github.ref == 'refs/heads/master ' || startsWith(github.ref, 'refs/tags')
60
+ # Only main and tags are published
61
+ if : github.ref == 'refs/heads/main ' || startsWith(github.ref, 'refs/tags')
62
62
# We pin to the SHA, not the tag, for security reasons.
63
63
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
64
64
uses : peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
You can’t perform that action at this time.
0 commit comments