-
Notifications
You must be signed in to change notification settings - Fork 194
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
initial draft for github action #358
Draft
auvipy
wants to merge
9
commits into
main
Choose a base branch
from
ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d4aef0e
initial draft for github action
auvipy 2ed9a87
adjust commands
auvipy 3aa750e
added env var
auvipy b0fdd93
moved file and some adjustment
auvipy a290597
moved file and some adjustment
auvipy 8fa4c1e
docker option
auvipy dc35fac
adjustment
auvipy 4ed1b3c
djustments
auvipy ca55637
adjustments
auvipy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: AMQP | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
GITHUB_WORKFLOW: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-20.04, macos-latest] | ||
python-version: ['3.6', '3.7', '3.8', '3.9', 'pypy3'] | ||
exclude: | ||
- os: macos-latest | ||
python-version: 3.6, 3.7 | ||
#- os: windows-latest | ||
# python-version: 3.6, 3.7 | ||
# additional service containers to run | ||
services: | ||
# postgres service | ||
rabbitmq: | ||
# docker hub image | ||
image: rabbitmq | ||
# configure the instance | ||
env: | ||
RABBITMQ_DEFAULT_USER: craiga | ||
RABBITMQ_DEFAULT_PASS: security_is_important | ||
ports: | ||
- 5432:5432 | ||
# set health checks to wait until service has started | ||
#options: >- | ||
# --health_cmd = "rabbitmq-diagnostics ping -q" | ||
# --health_interval = 10 | ||
# --health_timeout = 10 | ||
# --health_retries = 30 | ||
# --health_start_period = 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: | ||
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
${{ matrix.python-version }}-v1- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -r requirements/default.txt \ | ||
-r requirements/test.txt \ | ||
-r requirements/test-ci.txt \ | ||
-r requirements/docs.txt \ | ||
-r requirements/pkgutils.txt | ||
|
||
- name: Run Unit test with tox-docker | ||
run: | | ||
PYTHONPATH=. pytest -xv --cov=celery --cov-report=xml --cov-report term t/unit | ||
|
||
- name: Run Integration test with tox-docker | ||
run: | | ||
PYTHONPATH=. pytest -xv -E rabbitmq t/integration | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't work without tox. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
|
||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | ||
flags: unittests # optional | ||
fail_ci_if_error: true # optional (default = false) | ||
verbose: true # optional (default = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
pytest-cov | ||
codecov | ||
pytest-travis-fold | ||
pytest-xdist |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run with tox.