Unit tests #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pytest | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Only run after linting has finished | |
# workflow_run: | |
# workflows: ['ruff'] | |
# types: [completed] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: abatilo/actions-poetry@v2 | |
- name: Install the project dependencies | |
run: poetry install --with=dev | |
- name: Run the tests | |
run: pytest tests --cov=dfttools --cov-report xml | |
# TODO when approved for the maurergroup organisation | |
# - name: Coveralls GitHub Action | |
# uses: coverallsapp/[email protected] | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# parallel: true # Enable parallel support for Coveralls if needed |