Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use github actions instead of travis #6

Merged
merged 1 commit into from
Dec 8, 2020
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
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.