Skip to content

Commit 90b9387

Browse files
authored
Clean up GitHub Actions workflow (#10)
* Manage import order using isort * Install necessary packages * Clean up the GitHub Actions workflow * Add a pypy build * Fix stray colon
1 parent 4ed25bf commit 90b9387

2 files changed

Lines changed: 48 additions & 41 deletions

File tree

.github/workflows/on-commit.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Run tests and style checks on each commit to an open pull request.
2+
3+
name: on-commit
4+
5+
on: pull_request
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
python-version: ['3.6', '3.9', '3.10-dev', 'pypy-3.7']
14+
15+
steps:
16+
- name: Check out the code
17+
uses: actions/checkout@v2
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Test with unittest
23+
run: |
24+
python -m unittest
25+
26+
style:
27+
runs-on: ubuntu-latest
28+
29+
strategy:
30+
matrix:
31+
python-version: ['3.9']
32+
33+
steps:
34+
- name: Check out the code
35+
uses: actions/checkout@v2
36+
- name: Set up Python ${{ matrix.python-version }}
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
python -m pip install black flake8 isort
44+
- name: Run style checks
45+
run: |
46+
python -m flake8 .
47+
python -m isort --check .
48+
python -m black --check .

.github/workflows/python-package.yml

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

0 commit comments

Comments
 (0)