Skip to content

Commit

Permalink
Merge pull request #224 from graingert/gha
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Sep 3, 2020
2 parents 486f9e5 + 8a6c7b5 commit dd9eea4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
51 changes: 29 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
branches:
- master
tags:
- v*
pull_request:
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
modernize:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8]
os: [macOS-latest, ubuntu-latest, windows-latest]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

# Runs a set of commands using the runners shell
- name: Run a multi-line script
- name: Set Up Node for prettier
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install
run: |
echo Add other actions to build,
echo test, and deploy your project.
pip install tox
- name: tox
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: tox -e py,lint,coveralls
14 changes: 5 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
sudo: false
language: python
matrix:
include:
- python: "3.6"
env: TOXENV=py36,lint,coveralls
- python: "3.7"
env: TOXENV=py37,lint,coveralls
- python: "3.8"
env: TOXENV=py38,lint,coveralls
python:
- "3.6"
- "3.7"
- "3.8"
install:
- nvm install 14
- pip install tox
script: tox
script: tox -e py,lint,coveralls
cache:
pip: true
directories:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ commands =
coverage run --branch --source=libmodernize setup.py test {posargs}

[testenv:coveralls]
passenv = TRAVIS TRAVIS_*
passenv = TRAVIS TRAVIS_* GITHUB_*
deps =
coveralls
commands = coveralls
Expand Down

0 comments on commit dd9eea4

Please sign in to comment.