Skip to content

Commit

Permalink
Add tests workflow
Browse files Browse the repository at this point in the history
Create a workflow for testing
  • Loading branch information
ReRubis authored Jan 17, 2024
1 parent 2d364b2 commit 93c982c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Python Test Workflow

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
# The workflow run is canceled if a run on the same branch or pull request is in progress
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
cache: true

- name: Install dependencies
run: |
pdm sync
- name: Run pytest
run: |
pdm run pytest

0 comments on commit 93c982c

Please sign in to comment.