Skip to content

Commit 9df8f94

Browse files
authored
Add a GITHUB_TOKEN to h2spec script, pin to ubuntu-22.04
1 parent 63b6b97 commit 9df8f94

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
tox:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04 # bump to -latest or -22.04 once we drop py36
1212
strategy:
1313
max-parallel: 5
1414
matrix:
@@ -18,18 +18,20 @@ jobs:
1818
- "3.8"
1919
- "3.9"
2020
- "3.10"
21-
- pypy3
21+
- "pypy3.9"
2222

2323
steps:
2424
- uses: actions/checkout@v2
25-
- uses: actions/setup-python@v2
25+
- uses: actions/setup-python@v4
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Install tox
2929
run: |
3030
python -m pip install --upgrade pip setuptools
3131
pip install --upgrade tox tox-gh-actions
3232
- name: Install h2spec
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3335
run: |
3436
.github/workflows/install_h2spec.sh
3537
- name: Initialize tox envs

.github/workflows/install_h2spec.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
#!/usr/bin/env bash
22

33
set -e
4-
set -x
54

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

98
# We want to get the latest release of h2spec. We do that by asking the
109
# Github API for it, and then parsing the JSON for the appropriate kind of
1110
# binary. Happily, the binary is always called "h2spec" so we don't need
1211
# even more shenanigans to get this to work.
13-
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"))')
12+
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"))')
1413

1514
curl -s -L "$TARBALL" -o h2spec.tgz
1615
tar xvf h2spec.tgz

tox.ini

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py36, py37, py38, py39, py310, pypy3, lint, docs, packaging
2+
envlist = py36, py37, py38, py39, py310, py311, pypy3, lint, docs, packaging
33

44
[gh-actions]
55
python =
@@ -8,6 +8,7 @@ python =
88
3.8: py38
99
3.9: py39, lint, docs, packaging, h2spec
1010
3.10: py310
11+
3.11: py311
1112
pypy3: pypy3
1213

1314
[testenv]
@@ -33,7 +34,7 @@ commands = flake8 src/ test/
3334
[testenv:docs]
3435
deps =
3536
sphinx>=4.0.2,<5
36-
whitelist_externals = make
37+
allowlist_externals = make
3738
changedir = {toxinidir}/docs
3839
commands =
3940
make clean
@@ -42,10 +43,10 @@ commands =
4243
[testenv:packaging]
4344
basepython = python3.9
4445
deps =
45-
check-manifest==0.46
46-
readme-renderer==29.0
46+
check-manifest==0.49
47+
readme-renderer==37.3
4748
twine>=3.4.1,<4
48-
whitelist_externals = rm
49+
allowlist_externals = rm
4950
commands =
5051
rm -rf dist/
5152
check-manifest
@@ -56,7 +57,7 @@ commands =
5657
basepython = {[testenv:packaging]basepython}
5758
deps =
5859
{[testenv:packaging]deps}
59-
whitelist_externals = {[testenv:packaging]whitelist_externals}
60+
allowlist_externals = {[testenv:packaging]allowlist_externals}
6061
commands =
6162
{[testenv:packaging]commands}
6263
twine upload dist/*
@@ -72,6 +73,6 @@ commands =
7273
basepython = python3.8
7374
deps =
7475
twisted[tls]==20.3.0
75-
whitelist_externals = {toxinidir}/test/h2spectest.sh
76+
allowlist_externals = {toxinidir}/test/h2spectest.sh
7677
commands =
7778
{toxinidir}/test/h2spectest.sh

0 commit comments

Comments
 (0)