-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (52 loc) · 1.47 KB
/
python-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Test
on:
pull_request:
push:
branches:
- master
tags:
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.nsq-version }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os:
- Ubuntu
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
nsq-version:
- "nsq-1.1.0.linux-amd64.go1.10.3"
- "nsq-1.2.0.linux-amd64.go1.12.9"
- "nsq-1.2.1.linux-amd64.go1.16.6"
env:
PY_COLORS: 1
PYTEST_ADDOPTS: --cov-report=xml
steps:
- uses: actions/checkout@master
- name: Download NSQ
run: |
curl -sSL "http://bitly-downloads.s3.amazonaws.com/nsq/${{matrix.nsq-version}}.tar.gz" \
| tar -xzv --strip-components=1
sudo ln -s ./bin/nsqd /bin/nsqd
./bin/nsqd --version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install test dependencies
run: python -m pip install tox-gh-actions
- name: Prepare test environment
run: tox --notest
- name: Test
run: |
export PATH=bin:$PATH
tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
name: ${{ runner.os }}-${{ matrix.python-version }}