Skip to content

[pre-commit.ci] pre-commit autoupdate #681

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #681

Workflow file for this run

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 }}