Skip to content

feat!: Project dust-off #3

feat!: Project dust-off

feat!: Project dust-off #3

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- "main"
tags:
- "*"
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Get python version from file
run: echo "PYTHON_VERSION=$(cat .python-version)" | tee -a "$GITHUB_ENV"
- name: Install poetry
run: pipx install poetry
- name: Set up python environment
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'poetry'
- run: poetry install --no-root --with=tests --sync
- run: poetry run pytest --cov --cov-report=xml --cov-report=term
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
name: coverage-${{ matrix.python-version }}
if: always()
- name: Upload coverage reports to Codeclimate
uses: paambaati/codeclimate-action@v2.2.4
env:
CC_TEST_REPORTER_ID: bfeb9df569119f2dfbf094be7ebff7f1c40ab30660d1cb949fc43c3c68618ee6
with:
coverageLocations: |
coverage.xml:coverage.py
coverageCommand: yarn coverage
if: always()