diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/dependabot.yml | 6 | ||||
-rw-r--r-- | .github/workflows/bleeding.yml | 54 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 90 | ||||
-rw-r--r-- | .github/workflows/docker.yml | 61 | ||||
-rw-r--r-- | .github/workflows/recompile-requirements.yml | 6 |
5 files changed, 152 insertions, 65 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 123014908..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" diff --git a/.github/workflows/bleeding.yml b/.github/workflows/bleeding.yml new file mode 100644 index 000000000..7b1eae77d --- /dev/null +++ b/.github/workflows/bleeding.yml @@ -0,0 +1,54 @@ +name: Bleeding-edge CI + +on: + workflow_dispatch: + schedule: + # Every Monday at 03:05 UTC + # https://crontab.guru/#05_03_*_*_1 + - cron: '05 03 * * 1' + +jobs: + tests: + if: "github.repository == 'qutebrowser/qutebrowser'" + runs-on: ubuntu-20.04 + timeout-minutes: 30 + container: + image: "qutebrowser/ci:archlinux-webengine-unstable" + env: + PY_COLORS: "1" + DOCKER: "archlinux-webengine-unstable" + CI: true + PYTEST_ADDOPTS: "--color=yes" + volumes: + # Hardcoded because we can't use ${{ runner.temp }} here apparently. + - /home/runner/work/_temp/:/home/runner/work/_temp/ + options: --privileged --tty + steps: + - uses: actions/checkout@v2 + - name: Set up problem matchers + run: "python scripts/dev/ci/problemmatchers.py py3 ${{ runner.temp }}" + - run: tox -e bleeding + + irc: + timeout-minutes: 2 + continue-on-error: true + runs-on: ubuntu-20.04 + needs: [tests] + if: "always() && github.repository == 'qutebrowser/qutebrowser'" + steps: + - name: Send success IRC notification + uses: Gottox/irc-message-action@v1 + if: "needs.tests.result == 'success'" + with: + server: chat.freenode.net + channel: '#qutebrowser-dev' + nickname: qutebrowser-bot + message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})" + - name: Send non-success IRC notification + uses: Gottox/irc-message-action@v1 + if: "needs.tests.result != 'success'" + with: + server: chat.freenode.net + channel: '#qutebrowser-dev' + nickname: qutebrowser-bot + message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b7938c8be..3476f2abc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: linters: if: "!contains(github.event.head_commit.message, '[ci skip]')" timeout-minutes: 10 - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: @@ -38,11 +38,11 @@ jobs: .mypy_cache .tox ~/.cache/pip - key: "${{ matrix.testenv }}-${{ hashFiles('misc/requirements/requirements-*.txt') }}-${{ hashFiles('requirements.txt') }}" - - uses: actions/setup-python@v2.1.1 + key: "${{ matrix.testenv }}-${{ hashFiles('misc/requirements/requirements-*.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('scripts/dev/pylint_checkers/qute_pylint/*.py') }}" + - uses: actions/setup-python@v2 with: python-version: '3.8' - - uses: actions/setup-node@v2.1.1 + - uses: actions/setup-node@v2-beta with: node-version: '12.x' if: "matrix.testenv == 'eslint'" @@ -57,7 +57,7 @@ jobs: bindir="$HOME/.local/bin" mkdir -p "$bindir" wget -qO- "https://github.com/koalaman/shellcheck/releases/download/$scversion/shellcheck-$scversion.linux.x86_64.tar.xz" | tar -xJv --strip-components 1 -C "$bindir" shellcheck-$scversion/shellcheck - echo "::add-path::$bindir" + echo "$bindir" >> "$GITHUB_PATH" fi python -m pip install -U pip python -m pip install -U -r misc/requirements/requirements-tox.txt @@ -90,7 +90,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up problem matchers run: "python scripts/dev/ci/problemmatchers.py py38 ${{ runner.temp }}" - - run: dbus-run-session tox -e py38 + - run: dbus-run-session tox -e py tests: if: "!contains(github.event.head_commit.message, '[ci skip]')" @@ -100,52 +100,44 @@ jobs: fail-fast: false matrix: include: - ### PyQt 5.7.1 (Python 3.5) - # - testenv: py35-pyqt57 - # os: ubuntu-16.04 - # python: 3.5 - # experimental: true - ### PyQt 5.9 (Python 3.6) - - testenv: py36-pyqt59 + ### PyQt 5.12 (Python 3.6) + - testenv: py36-pyqt512 os: ubuntu-18.04 python: 3.6 - ### PyQt 5.10 (Python 3.6) - - testenv: py36-pyqt510 - os: ubuntu-20.04 - python: 3.6 - ### PyQt 5.11 (Python 3.7) - - testenv: py37-pyqt511 + ### PyQt 5.13 (Python 3.7) + - testenv: py37-pyqt513 os: ubuntu-20.04 python: 3.7 - ### PyQt 5.12 (Python 3.8) - - testenv: py38-pyqt512 - os: ubuntu-20.04 - python: 3.8 - ### PyQt 5.13 (Python 3.8) - - testenv: py38-pyqt513 - os: ubuntu-20.04 - python: 3.8 ### PyQt 5.14 (Python 3.8) - testenv: py38-pyqt514 os: ubuntu-20.04 python: 3.8 - ### PyQt 5.15 (Python nightly) - - testenv: py3-pyqt515 + ### PyQt 5.15.0 (Python 3.9) + - testenv: py39-pyqt5150 os: ubuntu-20.04 - python: 3.10-dev - ### PyQt 5.15 (Python 3.8, with coverage) - - testenv: py38-pyqt515-cov + python: 3.9 + ### PyQt 5.15 (Python 3.9, with coverage) + - testenv: py39-pyqt515-cov os: ubuntu-20.04 - python: 3.8 - ### macOS: PyQt 5.14 (Python 3.7) - - testenv: py37-pyqt514 + python: 3.9 + ### PyQt 5.15 (Python 3.10) + - testenv: py310-pyqt515 + os: ubuntu-20.04 + python: 3.10-dev + ### macOS: PyQt 5.15 (Python 3.9 to match PyInstaller env) + - testenv: py39-pyqt515 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 + ### macOS Big Sur + # - testenv: py39-pyqt515 + # os: macos-11.0 + # python: 3.9 + # args: "tests/unit" # Only run unit tests on macOS + ### Windows: PyQt 5.15 (Python 3.9 to match PyInstaller env) + - testenv: py39-pyqt515 os: windows-2019 - python: 3.7 + python: 3.9 runs-on: "${{ matrix.os }}" steps: - uses: actions/checkout@v2 @@ -157,13 +149,7 @@ jobs: ~/.cache/pip key: "${{ matrix.testenv }}-${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('misc/requirements/requirements-*.txt') }}-${{ hashFiles('requirements.txt') }}" - name: Set up Python - uses: actions/setup-python@v2.1.1 - if: "!endsWith(matrix.python, '-dev')" - with: - python-version: "${{ matrix.python }}" - - name: Set up development Python - uses: deadsnakes/action@v1.0.0 - if: "endsWith(matrix.python, '-dev')" + uses: actions/setup-python@v2 with: python-version: "${{ matrix.python }}" - name: Set up problem matchers @@ -188,25 +174,17 @@ jobs: if: "failure()" - name: Upload coverage if: "endsWith(matrix.testenv, '-cov')" - uses: codecov/codecov-action@v1.0.12 + uses: codecov/codecov-action@v1 with: name: "${{ matrix.testenv }}" codeql: if: "!contains(github.event.head_commit.message, '[ci skip]')" timeout-minutes: 30 - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout repository uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: @@ -217,7 +195,7 @@ jobs: irc: timeout-minutes: 2 continue-on-error: true - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [linters, tests, tests-docker, codeql] if: "always() && github.repository_owner == 'qutebrowser'" steps: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..d4023d57c --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,61 @@ +name: Rebuild Docker CI images + +on: + workflow_dispatch: + schedule: + - cron: "23 5 * * *" # daily at 5:23 + +jobs: + docker: + if: "github.repository == 'qutebrowser/qutebrowser'" + runs-on: ubuntu-20.04 + strategy: + matrix: + image: + - archlinux-webkit + - archlinux-webengine + - archlinux-webengine-unstable + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - run: pip install jinja2 + - name: Generate Dockerfile + run: python3 generate.py ${{ matrix.image }} + working-directory: scripts/dev/ci/docker/ + - uses: docker/setup-buildx-action@v1 + - uses: docker/login-action@v1 + with: + username: qutebrowser + password: ${{ secrets.DOCKER_TOKEN }} + - uses: docker/build-push-action@v2 + with: + file: scripts/dev/ci/docker/Dockerfile + context: . + tags: "qutebrowser/ci:${{ matrix.image }}" + push: ${{ github.ref == 'refs/heads/master' }} + + irc: + timeout-minutes: 2 + continue-on-error: true + runs-on: ubuntu-20.04 + needs: [docker] + if: "always() && github.repository == 'qutebrowser/qutebrowser'" + steps: + - name: Send success IRC notification + uses: Gottox/irc-message-action@v1 + if: "needs.docker.result == 'success'" + with: + server: chat.freenode.net + channel: '#qutebrowser-dev' + nickname: qutebrowser-bot + message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})" + - name: Send non-success IRC notification + uses: Gottox/irc-message-action@v1 + if: "needs.docker.result != 'success'" + with: + server: chat.freenode.net + channel: '#qutebrowser-dev' + nickname: qutebrowser-bot + message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})" diff --git a/.github/workflows/recompile-requirements.yml b/.github/workflows/recompile-requirements.yml index 73254d854..0765a18be 100644 --- a/.github/workflows/recompile-requirements.yml +++ b/.github/workflows/recompile-requirements.yml @@ -20,18 +20,18 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python 3.7 - uses: actions/setup-python@v2.1.1 + uses: actions/setup-python@v2 with: python-version: '3.7' - name: Set up Python 3.8 - uses: actions/setup-python@v2.1.1 + uses: actions/setup-python@v2 with: python-version: '3.8' - name: Recompile requirements run: "python3 scripts/dev/recompile_requirements.py ${{ github.events.input.environments }}" id: requirements - name: Create pull request - uses: peter-evans/create-pull-request@v2 + uses: peter-evans/create-pull-request@v3 with: committer: qutebrowser bot <bot@qutebrowser.org> author: qutebrowser bot <bot@qutebrowser.org> |