Skip to content

Commit

Permalink
Merge pull request #162 from Open-EO/HansVRP-unit_test_yaml
Browse files Browse the repository at this point in the history
Create unit_test.yml
  • Loading branch information
HansVRP authored Sep 27, 2024
2 parents 55249f9 + 006790d commit c650332
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pytest-collect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
python -m pip install pytest
python -m pip install .[dev]
- name: "pytest: check test collection"
run: pytest --collect-only
run: pytest tests --collect-only
38 changes: 38 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run Unit Tests

on:
push:
branches:
- '*' # or specific branches you want to include
pull_request:
branches:
- '*' # same here

jobs:
unit_tests:
name: Run Unit Tests on Multiple Python Versions
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.9, 3.11, 3.12]

steps:
- name: Checkout the repository
uses: actions/checkout@v3 # Updated to v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }} # Use Python version from the matrix
cache: 'pip'

- name: Install dependencies and pytest
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install .[dev]
- name: Run Unit Tests
run: |
python -m pytest tests/tests_unit # Ensure the path is correct

0 comments on commit c650332

Please sign in to comment.