Skip to content

Commit

Permalink
Merge pull request #6 from richm/github-actions
Browse files Browse the repository at this point in the history
use github actions instead of travis
  • Loading branch information
richm authored Dec 8, 2020
2 parents 0f3f520 + 29f926a commit b113fd8
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 9 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: tox
on: # yamllint disable-line rule:truthy
- pull_request
jobs:
python:
runs-on: ubuntu-latest
strategy:
matrix:
pyver: ['2.7', '3.6', '3.7', '3.8', '3.9']
steps:
- name: checkout PR
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyver }}
- name: Install platform dependencies, python, tox
run: |
set -euxo pipefail
python -m pip install --upgrade pip
pip install -rtox_requirements.txt
- name: Run tox tests
run: |
set -euxo pipefail
tox
env:
COVERALLS_CMD: coveralls
COVERALLS_PARALLEL: "true"
python-26:
runs-on: ubuntu-16.04
steps:
- name: checkout PR
uses: actions/checkout@v2
- name: Install python, dependencies
run: |
set -euo pipefail
curl -sSf --retry 5 -o python-2.6.tar.bz2 ${PY26URL}
sudo tar xjf python-2.6.tar.bz2 --directory /
myuid=$(id -u)
mygid=$(id -g)
sudo chown -R $myuid:$mygid /home/travis/virtualenv
source /home/travis/virtualenv/python2.6/bin/activate
set -x
pip install -rtox_requirements.txt
env:
# yamllint disable-line rule:line-length
PY26URL: https://storage.googleapis.com/travis-ci-language-archives/python/binaries/ubuntu/14.04/x86_64/python-2.6.tar.bz2
VIRTUAL_ENV_DISABLE_PROMPT: "true"
- name: Run tox tests
run: |
set -euo pipefail
source /home/travis/virtualenv/python2.6/bin/activate
set -x
tox -e py26-tox20
env:
COVERALLS_CMD: "echo skipping coveralls"
SAFETY_CMD: "echo skipping safety"
VIRTUAL_ENV_DISABLE_PROMPT: "true"
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
![CI Status](https://github.com/linux-system-roles/auto-maintenance/workflows/tox/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/linux-system-roles/tox-lsr/badge.svg?branch=main)](https://coveralls.io/github/linux-system-roles/tox-lsr?branch=main)

# Linux System Roles Plugin for `tox`
Expand Down
4 changes: 4 additions & 0 deletions tox-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tox<3 ; python_version < "2.7"
virtualenv==15.* ; python_version < "2.7"
pluggy==0.5.* ; python_version < "2.7"
coveralls ; python_version > "2.6"
5 changes: 0 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,3 @@ deps =
commands =
pydocstyle --add-ignore=D203,D212 setup.py src/tox_lsr
pydocstyle --add-ignore=D101,D102,D103,D107,D203,D212 stubs tests/unit

[travis]
python =
2.6: py26-tox20
3.6: py36-tox30, black, isort, pylint, flake8, bandit, pydocstyle
4 changes: 0 additions & 4 deletions travis-requirements.txt

This file was deleted.

0 comments on commit b113fd8

Please sign in to comment.