Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
name: Black Formatting
---
name: Python

on: [pull_request]
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Output env variables
run: |
echo "Default branch=${default-branch}"
echo "GITHUB_WORKFLOW=${GITHUB_WORKFLOW}"
echo "GITHUB_ACTION=$GITHUB_ACTION"
echo "GITHUB_ACTIONS=$GITHUB_ACTIONS"
Expand All @@ -26,18 +31,36 @@ jobs:
cat $GITHUB_EVENT_PATH
echo "\n"
echo "::debug::---end"

- name: Set up Python 3.7
uses: actions/setup-python@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7

python-version: 3.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip black
python3 -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Check
run: |
tox -e checks

tests:
needs: check
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

- name: Run black
id: black
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: |
black --check .
echo "::set-output name=rc::$?"
tox
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/322.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch from Travis CI to GitHub Actions.
14 changes: 10 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[tox]
envlist =
flake8
py{36,37,38,39,310}
docs
mypy
checks
py{36,37,38,39}
isolated_build = True

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
# 3.10: py310


[testenv]
description = Run test suite for {basepython}
Expand Down