Skip to content

Commit 9f2c5a3

Browse files
committed
CI: Switch to GitHub actions.
1 parent 752fb2a commit 9f2c5a3

File tree

3 files changed

+123
-60
lines changed

3 files changed

+123
-60
lines changed

.github/workflows/test.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
download:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install test dependencies
20+
run: ./scripts/ci-install.sh
21+
22+
- name: Upload test dependencies
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: test-dependencies
26+
path: tests/data/ux.stackexchange.com.7z
27+
if-no-files-found: error
28+
compression-level: 0
29+
30+
python2:
31+
needs: download
32+
33+
runs-on: ubuntu-latest
34+
container:
35+
image: python:2.7.18-buster
36+
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
python-version:
41+
- "2.7"
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- name: Build module
47+
run: python setup.py build
48+
49+
- name: Download test dependencies
50+
uses: actions/download-artifact@v4
51+
with:
52+
name: test-dependencies
53+
path: tests/data
54+
55+
- name: Run tests
56+
run: python setup.py test
57+
58+
python3-old:
59+
needs: download
60+
61+
runs-on: ubuntu-20.04
62+
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
python-version:
67+
- "3.5"
68+
- "3.6"
69+
- "3.7"
70+
71+
steps:
72+
- uses: actions/checkout@v4
73+
74+
- name: Set up Python ${{ matrix.python-version }}
75+
uses: actions/setup-python@v5
76+
with:
77+
python-version: ${{ matrix.python-version }}
78+
79+
- name: Build module
80+
run: python setup.py build
81+
82+
- name: Download test dependencies
83+
uses: actions/download-artifact@v4
84+
with:
85+
name: test-dependencies
86+
path: tests/data
87+
88+
- name: Run tests
89+
run: python setup.py test
90+
91+
python3:
92+
needs: download
93+
94+
runs-on: ubuntu-latest
95+
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
python-version:
100+
- "3.8"
101+
- "3.9"
102+
- "3.10"
103+
- "3.11"
104+
105+
steps:
106+
- uses: actions/checkout@v4
107+
108+
- name: Set up Python ${{ matrix.python-version }}
109+
uses: actions/setup-python@v5
110+
with:
111+
python-version: ${{ matrix.python-version }}
112+
113+
- name: Build module
114+
run: python setup.py build
115+
116+
- name: Download test dependencies
117+
uses: actions/download-artifact@v4
118+
with:
119+
name: test-dependencies
120+
path: tests/data
121+
122+
- name: Run tests
123+
run: python setup.py test

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

scripts/ci-install.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
#!/bin/bash
22
set -e
33

4-
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
5-
if [[ $PYVER == '2' ]]; then
6-
formula="python${PYVER}"
7-
else
8-
formula="python"
9-
fi
10-
# Update Python if already installed, otherwise install.
11-
echo "Installing / updating ${formula} ..."
12-
if [[ $PYVER == '3' ]]; then
13-
brew list "${formula}" &>/dev/null && brew upgrade "${formula}"
14-
fi
15-
brew list "${formula}" &>/dev/null || brew install "${formula}"
16-
echo -n "Using: "
17-
"python$PYVER" --version
18-
fi
19-
204
echo "Downloading ux.stackexchange.com.7z ..."
215
mkdir -p $HOME/.downloads
226
( cd $HOME/.downloads && wget --no-check-certificate --timestamping https://archive.org/download/stackexchange/ux.stackexchange.com.7z )

0 commit comments

Comments
 (0)