From 95a93cdf98eb29ebee70fdc9c0b42755fa4032c9 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Fri, 20 Nov 2020 08:08:05 +0100 Subject: [PATCH] Use GitHub Actions instead of Travis CI --- .github/workflows/tox.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 12 ------------ tox.ini | 11 ++++++----- 3 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/tox.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml new file mode 100644 index 0000000..9bc11f6 --- /dev/null +++ b/.github/workflows/tox.yml @@ -0,0 +1,33 @@ +--- +name: Run Tox + +# yamllint disable rule:truthy +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run Tox tests + id: test + uses: fedora-python/tox-github-action@master + with: + tox_env: py39,lint + # Same list of packages in Dockerfile + dnf_install: >- + --repo fedora --repo updates + python3-requests + python3-jira + python3-fedmsg-core + python3-pygithub + python3-jinja2 + python3-pypandoc + python3-requests-kerberos + + - name: Coveralls + uses: AndreMiras/coveralls-python-action@develop diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 27faeb5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: python -python: - - "3.7" -install: - - pip install tox - - pip install coveralls -jobs: - include: - - stage: Unit Tests - script: tox - after_success: - - coveralls diff --git a/tox.ini b/tox.ini index fa93d56..db66d03 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37,lint +envlist = py39,lint [testenv] passenv = TRAVIS TRAVIS_* @@ -13,18 +13,19 @@ setenv = CONFLUENCE_USERNAME=mock_confluence_username CONFLUENCE_PASSWORD=mock_confluence_password basepython = - py37: python3.7 + py39: python3.9 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -sitepackages = False +sitepackages = True +whitelist_externals = /usr/bin/flake8 commands = coverage run -m pytest {posargs} --ignore=tests/integration_tests -# Add the following line locally to get an HTML report --cov-report html:htmlcov-py37 +# Add the following line locally to get an HTML report --cov-report html:htmlcov-py39 [testenv:lint] skip_install = true -basepython = python3.7 +basepython = python3.9 deps = flake8 commands =