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

github actions #2

Merged
merged 1 commit into from
Dec 2, 2023
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
37 changes: 37 additions & 0 deletions .github/workflows/pep257.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: pep257

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

pep257:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install pep257

- name: source
run: |
python -m pep257 pipeline_integrity

- name: tests
run: |
python -m pep257 --match='.*\.py' tests/test
31 changes: 31 additions & 0 deletions .github/workflows/py2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
name: py2

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

py2:
name: Run tests with Python 2.7
runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@v3

- name: Build docker image
run: |
cd tests/docker
cp ../../requirements.txt requirements.txt
cp ../../tests/requirements.txt tests.txt
docker-compose build

- name: Run tests
run: docker-compose --file tests/docker/docker-compose.yml run py2
51 changes: 51 additions & 0 deletions .github/workflows/py3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
name: py3

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

py3:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tests/requirements.txt

- name: flake8
run: |
flake8 --count --show-source --statistics --max-line-length=120 pipeline_integrity
flake8 --count --show-source --statistics --max-line-length=120 tests/test

- name: pylint
run: |
python -m pylint pipeline_integrity
python -m pylint tests/test

- name: pytest
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
pytest --cov=pipeline_integrity --cov-report xml --cov-report term:skip-covered --durations=5 tests
if [ "$CODACY_PROJECT_TOKEN" != "" ]; then
python-codacy-coverage -r coverage.xml
fi