Skip to content

Fix STHDQ bugs

Fix STHDQ bugs #20

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
PYTHONUNBUFFERED: "1"
PYTHONHASHSEED: "1"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: True
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
defaults:
run:
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Activate env
run: |
source $VENV
- name: Run ruff
run: |
poetry run ruff check --output-format=github .
poetry run ruff format . --diff
- name: Run mypy
run: |
poetry run mypy .
- name: Run tests
run: |
poetry run pytest --cov=obscure_stats --cov-report term --cov-report xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.python-version == '3.11'
with:
flags: smart-tests
verbose: true
file: ./coverage.xml
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}