Skip to content

Commit

Permalink
Migrate to Github Actions (#86)
Browse files Browse the repository at this point in the history
The syntax is nicer than Travis IMO, plus this fixes #69
  • Loading branch information
moggers87 committed Oct 28, 2020
1 parent f39b6b7 commit 31c33d7
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[{*.yml,*.yaml}]
indent_size = 2
53 changes: 53 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests

on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
- cron: '01 07 * * *'

jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install pandoc on Mac
run: brew install pandoc
if: matrix.os == 'macos-latest'
- name: Install pandoc on Linux
run: sudo apt -y install pandoc
if: matrix.os == 'ubuntu-latest'
- name: Install tox
run: pip install tox tox-gh-actions
- name: Run tox
run: tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

misc:
runs-on: ubuntu-latest
strategy:
matrix:
tox_env: [flake8, isort, docs]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install tox
run: pip install tox
- name: Run tox
run: tox -e ${{ matrix.tox_env }}
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ skip_glob =
exhibition/_version.py
versioneer.py

[travis]
[gh-actions]
python =
3.8: clean,py38,coverage
3.9: clean,py39,coverage
Expand Down

0 comments on commit 31c33d7

Please sign in to comment.