Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Jan 2, 2023
1 parent 63b6b97 commit 4100d31
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
tox:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # bump to -latest or -22.04 once we drop py36
strategy:
max-parallel: 5
matrix:
Expand All @@ -18,18 +18,21 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- pypy3
- "3.11"
- "pypy3.9"

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip setuptools
pip install --upgrade tox tox-gh-actions
- name: Install h2spec
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
.github/workflows/install_h2spec.sh
- name: Initialize tox envs
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/install_h2spec.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/usr/bin/env bash

set -e
set -x

# For some reason it helps to have this here.
echo $(curl -s https://api.github.com/repos/summerwind/h2spec/releases/latest)
echo $(curl -s --url https://api.github.com/repos/summerwind/h2spec/releases/latest --header "authorization: Bearer ${GITHUB_TOKEN}")

# We want to get the latest release of h2spec. We do that by asking the
# Github API for it, and then parsing the JSON for the appropriate kind of
# binary. Happily, the binary is always called "h2spec" so we don't need
# even more shenanigans to get this to work.
TARBALL=$(curl -s https://api.github.com/repos/summerwind/h2spec/releases/latest | jq --raw-output '.assets[] | .browser_download_url | select(endswith("linux_amd64.tar.gz"))')
TARBALL=$(curl -s --url https://api.github.com/repos/summerwind/h2spec/releases/latest --header "authorization: Bearer ${GITHUB_TOKEN}" | jq --raw-output '.assets[] | .browser_download_url | select(endswith("linux_amd64.tar.gz"))')

curl -s -L "$TARBALL" -o h2spec.tgz
tar xvf h2spec.tgz
Expand Down
13 changes: 7 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36, py37, py38, py39, py310, pypy3, lint, docs, packaging
envlist = py36, py37, py38, py39, py310, py311, pypy3, lint, docs, packaging

[gh-actions]
python =
Expand All @@ -8,6 +8,7 @@ python =
3.8: py38
3.9: py39, lint, docs, packaging, h2spec
3.10: py310
3.11: py311
pypy3: pypy3

[testenv]
Expand All @@ -33,7 +34,7 @@ commands = flake8 src/ test/
[testenv:docs]
deps =
sphinx>=4.0.2,<5
whitelist_externals = make
allowlist_externals = make
changedir = {toxinidir}/docs
commands =
make clean
Expand All @@ -43,9 +44,9 @@ commands =
basepython = python3.9
deps =
check-manifest==0.46
readme-renderer==29.0
readme-renderer==37.3
twine>=3.4.1,<4
whitelist_externals = rm
allowlist_externals = rm
commands =
rm -rf dist/
check-manifest
Expand All @@ -56,7 +57,7 @@ commands =
basepython = {[testenv:packaging]basepython}
deps =
{[testenv:packaging]deps}
whitelist_externals = {[testenv:packaging]whitelist_externals}
allowlist_externals = {[testenv:packaging]allowlist_externals}
commands =
{[testenv:packaging]commands}
twine upload dist/*
Expand All @@ -72,6 +73,6 @@ commands =
basepython = python3.8
deps =
twisted[tls]==20.3.0
whitelist_externals = {toxinidir}/test/h2spectest.sh
allowlist_externals = {toxinidir}/test/h2spectest.sh
commands =
{toxinidir}/test/h2spectest.sh

0 comments on commit 4100d31

Please sign in to comment.