diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-07-03 13:57:04 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-07-03 18:55:46 +0200 |
commit | edf3adf1e8b03beedba45825c84bc0c31c163148 (patch) | |
tree | ddd62864d895e93100b80781d7e8c212978773c6 | |
parent | fcd58000ca58abde197d02794d03683b5e453070 (diff) | |
download | qutebrowser-edf3adf1e8b03beedba45825c84bc0c31c163148.tar.gz qutebrowser-edf3adf1e8b03beedba45825c84bc0c31c163148.zip |
ci: Get rid of run.sh
Instead, run tox directly from ci.yml and have an args matrix variable there.
This also changes the macOS args to only run unit tests, like on Travis.
-rw-r--r-- | .github/workflows/ci.yml | 28 | ||||
-rw-r--r-- | scripts/dev/ci/run.sh | 35 |
2 files changed, 15 insertions, 48 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cea8df2b2..1b731073d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,17 +7,18 @@ jobs: strategy: fail-fast: false matrix: - testenv: - - pylint - - flake8 - - mypy - - docs - - vulture - - misc - - pyroma - - check-manifest - - eslint - - shellcheck + include: + - testenv: pylint + - testenv: flake8 + - testenv: mypy + - testenv: docs + - testenv: vulture + - testenv: misc + - testenv: pyroma + - testenv: check-manifest + - testenv: eslint + - testenv: shellcheck + args: "-f gcc" # For problem matchers steps: - uses: actions/checkout@v2 - uses: actions/cache@v2 @@ -39,7 +40,7 @@ jobs: - name: Install dependencies run: "bash scripts/dev/ci/install.sh ${{ matrix.testenv }}" - name: "Run ${{ matrix.testenv }}" - run: "bash scripts/dev/ci/run.sh ${{ matrix.testenv }}" + run: "tox -e ${{ matrix.testenv}} -- ${{ matrix.args }}" tests-docker: runs-on: ubuntu-20.04 @@ -107,6 +108,7 @@ jobs: - testenv: py37-pyqt514 os: macos-10.15 python: 3.7 + args: "tests/unit" # Only run unit tests on macOS ### Windows: PyQt 5.14 (Python 3.7) - testenv: py37-pyqt514 os: windows-2019 @@ -139,7 +141,7 @@ jobs: - name: "Run ${{ matrix.testenv }}" env: PYTEST_ADDOPTS: "--color=yes" - run: "bash scripts/dev/ci/run.sh ${{ matrix.testenv }}" + run: "tox -e ${{ matrix.testenv}} -- ${{ matrix.args }}" - name: Upload coverage if: "endsWith(matrix.testenv, '-cov')" uses: codecov/codecov-action@v1 diff --git a/scripts/dev/ci/run.sh b/scripts/dev/ci/run.sh deleted file mode 100644 index b0f4e7b09..000000000 --- a/scripts/dev/ci/run.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# vim: ft=sh fileencoding=utf-8 sts=4 sw=4 et: - -# Copyright 2016-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> - -# This file is part of qutebrowser. -# -# qutebrowser is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# qutebrowser is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>. - -set -e -testenv=$1 - -args=() -# We only run unit tests on macOS because it's quite slow. -[[ $TRAVIS_OS_NAME == osx ]] && args+=('--qute-bdd-webengine' '--no-xvfb' 'tests/unit') - -# GCC output in shellcheck for GitHub problem matchers -[[ $testenv == shellcheck ]] && args+=('-f' 'gcc') - -# WORKAROUND for unknown crash inside swrast_dri.so -# See https://github.com/qutebrowser/qutebrowser/pull/4218#issuecomment-421931770 -[[ $testenv == py36-pyqt59 ]] && export QT_QUICK_BACKEND=software - -tox -e "$testenv" -- "${args[@]}" |