Skip to content

Maintainance

Maintainance #69

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: Test Python package
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
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 Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: false
- name: Install dependencies
run: |
poetry install --no-interaction
- name: Test with pytest
run: |
poetry run pytest --cov dfds_ds_toolbox --cov-report=html:coverage
precommit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit
- name: run pre-commit
run: |
pre-commit run --all-files