Skip to content

Commit 0cb4090

Browse files
Lukasapgjones
authored andcommitted
Add a Travis install script
1 parent d588e7c commit 0cb4090

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ matrix:
4242
- python: "3.7"
4343
dist: xenial
4444
env: TOXENV=packaging
45+
- python: "3.6"
46+
env: TOXENV=h2spec
4547

4648
install:
47-
- "pip install -U pip setuptools"
48-
- "pip install -U tox"
49+
- _travis/install.sh
4950
script:
5051
- tox -- --hypothesis-profile travis

_travis/install.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -x
5+
6+
pip install -U pip setuptools
7+
pip install -U tox
8+
9+
if [ $TOXENV = "h2spec" ]; then
10+
# We want to get the latest release of h2spec. We do that by asking the
11+
# Github API for it, and then parsing the JSON for the appropriate kind of
12+
# binary. Happily, the binary is always called "h2spec" so we don't need
13+
# even more shenanigans to get this to work.
14+
TARBALL=$(curl -s https://api.github.com/repos/summerwind/h2spec/releases/latest | jq '.assets[] | .browser_download_url | select(endswith("linux_amd64.tar.gz"))')
15+
curl -LO "$TARBALL"
16+
tar xvf $TARBALL
17+
mv h2spec /usr/local/bin
18+
fi

0 commit comments

Comments
 (0)