Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: switch from Travis-CI to GitHub Actions for CI #247

Merged
merged 1 commit into from
Jun 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-18.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
imgtag:
- "python:2.7-buster"
- "python:3.4-jessie"
- "python:3.5-buster"
- "python:3.6-buster"
- "python:3.7-buster"
- "python:3.8-buster"
tornado_ver:
- "4.5.3"
- "5.1.1"

container: "${{matrix.imgtag}}"
steps:
- uses: actions/checkout@v2
- name: Download NSQ
run: |
PY_VER="$(python -c 'import sys; print(sys.version_info[:2])')"
case "$PY_VER" in
'(3, 4)' | '(3, 7)' ) NSQ_DIST="nsq-1.0.0-compat.linux-amd64.go1.8" ;;
'(2, 7)' | '(3, 6)' ) NSQ_DIST="nsq-1.1.0.linux-amd64.go1.10.3" ;;
'(3, 5)' | '(3, 8)' ) NSQ_DIST="nsq-1.2.0.linux-amd64.go1.12.9" ;;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notice my weird scheme to reduce the text matrix by correlating version of python and version of nsqd

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did notice that, I resisted commenting 😁

esac
echo "PY_VER=$PY_VER"
echo "NSQ_DIST=$NSQ_DIST"
curl -sSL "http://bitly-downloads.s3.amazonaws.com/nsq/${NSQ_DIST}.tar.gz" \
| tar -xzv --strip-components=1
./bin/nsqd --version
- name: Install System Dependencies
run: |
apt-get -q -y update
apt-get -q -y install libsnappy-dev
- name: Install Python Dependencies
run: |
pip install python-snappy pycurl mock pytest==4.4.2 flake8==3.7.9 \
tornado==${{matrix.tornado_ver}}
- name: Lint
run: |
flake8 --version
flake8 --show-source
- name: Test
run: |
export PATH=bin:$PATH
pytest -v
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

41 changes: 0 additions & 41 deletions travis_test.sh

This file was deleted.