Skip to content

Node12 is deprecated. Upgrade actions #17

Node12 is deprecated. Upgrade actions

Node12 is deprecated. Upgrade actions #17

Workflow file for this run

name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python setup.py install
python -m pip install -r unittests/requirements.txt
- 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
- name: Test with pytest ${{ matrix.python-version }}
run: |
# Start all the mock server in the background
python unittests/mock_servers/good_mock_server_v1.py &
python unittests/mock_servers/good_mock_server_v2.py &
python unittests/mock_servers/bad_mock_server_v1.py &
python unittests/mock_servers/bad_mock_server_v2.py &
sleep 10
pytest --cov=compliance_suite/ --cov-report=term-missing unittests/
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}