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

Added GitHub actions CI #359

Merged
merged 3 commits into from
Mar 7, 2021
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
70 changes: 70 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI
on: [pull_request, push]
jobs:
#################### Linters and checkers ####################
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Check out code from GitHub
uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install --upgrade pip setuptools wheel tox tox-docker
- name: Run flake8
run: tox -v -e py-flake8 -- -v
- name: Run pydocstyle
run: tox -v -e py-pydocstyle -- -v
- name: Run apicheck
run: tox -v -e py-apicheck -- -v
#################### Unittests ####################
unittest:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6,3.7,3.8,pypy3]
steps:
- name: Check out code from GitHub
uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install --upgrade pip setuptools wheel tox tox-docker
- name: Run unittest
run: tox -v -e ${{ matrix.python-version }}-unit -- -v
Copy link
Member

Choose a reason for hiding this comment

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

when I first tried using tox integration tests in celery took so long time that I had to try other options. good to see it working good

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes GitHub actions are pretty fast.

#################### Integration tests ####################
integration:
needs: [lint, unittest]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6,3.7,3.8,pypy3]
steps:
- name: Check out code from GitHub
uses: actions/[email protected]
- name: Build rabbitmq:tls container
run: docker build -t rabbitmq:tls .
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install --upgrade pip setuptools wheel tox tox-docker
- name: Run integration tests
run: tox -v -e ${{ matrix.python-version }}-integration-rabbitmq -- -v
- name: Run integration tests with speedups enabled
run: |
CELERY_ENABLE_SPEEDUPS=1 python setup.py develop
tox -v -e ${{ matrix.python-version }}-integration-rabbitmq -- -v
if: ${{ matrix.python-version != 'pypy3'}}
83 changes: 0 additions & 83 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
{pypy3.6-7.3.1,3.6,3.7,3.8}-unit
{pypy3.6-7.3.1,3.6,3.7,3.8}-integration-rabbitmq
{pypy3,3.6,3.7,3.8}-unit
{pypy3,3.6,3.7,3.8}-integration-rabbitmq
flake8
flakeplus
apicheck
Expand All @@ -23,7 +23,7 @@ commands =
integration: py.test -xv -E rabbitmq t/integration {posargs:-n2}
basepython =
flake8,apicheck,linkcheck,pydocstyle: python3.8
pypy3.6-7.3.1: pypy
pypy3: pypy
3.6: python3.6
3.7: python3.7
3.8: python3.8
Expand All @@ -37,7 +37,7 @@ dockerenv =
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit tcp_listeners [5672]

[docker:rabbitmq]
image = rabbitmq
image = rabbitmq:tls
ports =
5672:5672/tcp
5671:5671/tcp
Expand Down