Skip to content

upgrade regs

upgrade regs #87

Workflow file for this run

# 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: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
python-version: [3.9, "3.10", 3.11]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
permissions:
# Gives the action the necessary permissions for publishing new
# comments in pull requests.
pull-requests: write
# Gives the action the necessary permissions for pushing data to the
# python-coverage-comment-action branch, and for editing existing
# comments (to avoid publishing multiple comments in the same PR)
contents: write
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
echo ${{ runner.os }} ${{ matrix.os }}
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements.dev.txt
- name: pre-commit
if: runner.os == 'Linux' # we do not need static code analizes on each OS, but we want to repeat it on Linux only for each Python version in matrix
run: |
pip install flake8 pylint pre-commit
pre-commit run --all-files
- name: Test with pytest and unittest
run: |
python -m unittest --verbose
python -m pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=bombard tests/ | tee pytest-coverage.txt
- name: Upload coverage data to coveralls.io
if: ${{ matrix.python-version == 3.11 && matrix.platform == 'ubuntu-latest' }}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Coverage to Codecov
if: ${{ matrix.python-version == 3.11 && matrix.platform == 'ubuntu-latest' }}
uses: codecov/codecov-action@v2
- name: Coverage comment
id: coverage_comment
if: ${{ matrix.python-version == 3.11 && matrix.platform == 'ubuntu-latest' }}
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 85
MINIMUM_ORANGE: 70
- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v3
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt