Skip to content

Update actions/setup-python action to v5 #85

Update actions/setup-python action to v5

Update actions/setup-python action to v5 #85

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r src/requirements.txt -r tests/requirements.txt .
- name: Run Black
run: black --check .
- name: Run Flake8
run: flake8 .
- name: Run isort
run: isort --check .
- name: Run tests and collect coverage
run: pytest --timeout=300 --junitxml=junit/test-results.xml --cov=relay --cov=tests --cov-report=xml --cov-report=html
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results
path: junit/test-results.xml
# Always run this step, even when there are test failures
if: ${{ always() }}
- name: Upload coverage to https://codecov.io
uses: codecov/codecov-action@v3
# See https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
#
# - name: Build package
# run: python -m build
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}