Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aa58f62

Browse filesBrowse files
committed
Fix #322: Implement GitHub Action
* Add "gh-action" section in tox.ini * Add .github/workflows/python-testing.yml * Use dependent jobs; first start check, then tests jobs * Add changelog * Remove black-formatting.yml * Remove .travis.yml
1 parent 608ce3c commit aa58f62
Copy full SHA for aa58f62

File tree

4 files changed

+48
-71
lines changed
Filter options

4 files changed

+48
-71
lines changed
+37-14Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
name: Black Formatting
1+
---
2+
name: Python
23

3-
on: [pull_request]
4+
on:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
49

510
jobs:
6-
build:
11+
check:
712
runs-on: ubuntu-latest
8-
913
steps:
1014
- uses: actions/checkout@v1
1115
- name: Output env variables
1216
run: |
17+
echo "Default branch=${default-branch}"
1318
echo "GITHUB_WORKFLOW=${GITHUB_WORKFLOW}"
1419
echo "GITHUB_ACTION=$GITHUB_ACTION"
1520
echo "GITHUB_ACTIONS=$GITHUB_ACTIONS"
@@ -26,18 +31,36 @@ jobs:
2631
cat $GITHUB_EVENT_PATH
2732
echo "\n"
2833
echo "::debug::---end"
29-
30-
- name: Set up Python 3.7
31-
uses: actions/setup-python@v1
34+
- name: Set up Python ${{ matrix.python-version }}
35+
uses: actions/setup-python@v2
3236
with:
33-
python-version: 3.7
34-
37+
python-version: 3.6
3538
- name: Install dependencies
3639
run: |
37-
python -m pip install --upgrade pip black
40+
python3 -m pip install --upgrade pip
41+
pip install tox tox-gh-actions
42+
- name: Check
43+
run: |
44+
tox -e checks
45+
46+
tests:
47+
needs: check
48+
runs-on: ubuntu-latest
49+
strategy:
50+
max-parallel: 5
51+
matrix:
52+
python-version: [3.6, 3.7, 3.8, 3.9]
3853

39-
- name: Run black
40-
id: black
54+
steps:
55+
- uses: actions/checkout@v1
56+
- name: Set up Python ${{ matrix.python-version }}
57+
uses: actions/setup-python@v2
58+
with:
59+
python-version: ${{ matrix.python-version }}
60+
- name: Install dependencies
61+
run: |
62+
python3 -m pip install --upgrade pip
63+
pip install tox tox-gh-actions
64+
- name: Test with tox
4165
run: |
42-
black --check .
43-
echo "::set-output name=rc::$?"
66+
tox

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
-53Lines changed: 0 additions & 53 deletions
This file was deleted.

‎changelog.d/322.trivial.rst

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Switch from Travis CI to GitHub Actions.

‎tox.ini

Copy file name to clipboardExpand all lines: tox.ini
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
[tox]
22
envlist =
3-
flake8
4-
py{36,37,38,39,310}
5-
docs
6-
mypy
3+
checks
4+
py{36,37,38,39}
75
isolated_build = True
86

7+
[gh-actions]
8+
python =
9+
3.6: py36
10+
3.7: py37
11+
3.8: py38
12+
3.9: py39
13+
# 3.10: py310
14+
915

1016
[testenv]
1117
description = Run test suite for {basepython}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.