Skip to content

Commit f2dd84a

Browse files
committed
Rename workflow
1 parent 3b14696 commit f2dd84a

File tree

2 files changed

+87
-127
lines changed

2 files changed

+87
-127
lines changed

.github/workflows/.main.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 87 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,87 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
4-
name: Python package
5-
6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
11-
12-
jobs:
13-
build:
14-
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
python-version: [3.5, 3.6, 3.7, 3.8]
19-
20-
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v1
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install -r requirements.txt
30-
- name: Lint with flake8
31-
run: |
32-
pip install flake8
33-
# stop the build if there are Python syntax errors or undefined names
34-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37-
- name: Test with pytest
38-
run: |
39-
pip install pytest
40-
pytest
1+
---
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: ["master"]
7+
pull_request:
8+
branches: ["master"]
9+
# Allow rebuilds via API.
10+
repository_dispatch:
11+
types: rebuild
12+
13+
jobs:
14+
tests:
15+
name: "Python ${{ matrix.python-version }}"
16+
runs-on: "ubuntu-latest"
17+
env:
18+
USING_COVERAGE: '3.8'
19+
20+
strategy:
21+
matrix:
22+
python-version: ["3.5", "3.6", "3.7", "3.8"]
23+
24+
steps:
25+
- uses: "actions/checkout@v2"
26+
- uses: "actions/setup-python@v1"
27+
with:
28+
python-version: "${{ matrix.python-version }}"
29+
- name: "Install dependencies"
30+
run: |
31+
set -xe
32+
python -VV
33+
python -m site
34+
python -m pip install --upgrade pip setuptools wheel
35+
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
36+
37+
- name: "Run tox targets for ${{ matrix.python-version }}"
38+
run: "python -m tox"
39+
40+
- name: "Combine coverage"
41+
run: |
42+
set -xe
43+
python -m coverage combine
44+
python -m coverage xml
45+
if: "contains(env.USING_COVERAGE, matrix.python-version)"
46+
- name: "Upload coverage to Codecov"
47+
if: "contains(env.USING_COVERAGE, matrix.python-version)"
48+
uses: "codecov/codecov-action@v1"
49+
with:
50+
fail_ci_if_error: true
51+
52+
package:
53+
name: "Build & verify package"
54+
runs-on: "ubuntu-latest"
55+
56+
steps:
57+
- uses: "actions/checkout@v2"
58+
- uses: "actions/setup-python@v1"
59+
with:
60+
python-version: "3.8"
61+
62+
- name: "Install pep517 and twine"
63+
run: "python -m pip install pep517 twine"
64+
- name: "Build package"
65+
run: "python -m pep517.build --source --binary ."
66+
- name: "List result"
67+
run: "ls -l dist"
68+
- name: "Check long_description"
69+
run: "python -m twine check dist/*"
70+
71+
install-dev:
72+
strategy:
73+
matrix:
74+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
75+
76+
name: "Verify dev env"
77+
runs-on: "${{ matrix.os }}"
78+
79+
steps:
80+
- uses: "actions/checkout@v2"
81+
- uses: "actions/setup-python@v1"
82+
with:
83+
python-version: "3.8"
84+
- name: "Install in dev mode"
85+
run: "python -m pip install -e .[dev]"
86+
- name: "Import package"
87+
run: "python -c 'import jwt; print(jwt.__version__)'"

0 commit comments

Comments
 (0)