Skip to content

Commit 096d634

Browse files
committed
master -> main
1 parent 09f46df commit 096d634

File tree

2 files changed

+60
-4
lines changed

2 files changed

+60
-4
lines changed

.github/workflows/code_test.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+

.github/workflows/docs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ jobs:
4848
path: build/html
4949

5050
- 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')
5353
# So use the args we normally pass to sphinx-build, but run sphinx-multiversion
5454
run: mv $(pipenv --venv)/bin/sphinx-multiversion $(pipenv --venv)/bin/sphinx-build
5555

5656
- name: Build Docs
5757
run: pipenv run docs
5858

5959
- 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')
6262
# We pin to the SHA, not the tag, for security reasons.
6363
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
6464
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3

0 commit comments

Comments
 (0)