Skip to content

Commit

Permalink
Merge pull request #734 from DHI/less_ci
Browse files Browse the repository at this point in the history
Only run tests on Windows before each release.
  • Loading branch information
ecomodeller authored Oct 16, 2024
2 parents 8bc29dd + 676aef3 commit 7ec68b2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/full_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ on:
jobs:
build:

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.9, "3.12"]

steps:
Expand Down
36 changes: 35 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,42 @@ on:
workflow_dispatch:

jobs:
deploy:

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.9, "3.12"]

steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1 # Fail fast if there are any linting errors
with:
version: 0.6.2 # consistent with pyproject.toml ?
src: mikeio # ignore notebooks
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
- name: Install mikeio
run: |
pip install .[test]
- name: Test with pytest
run: |
pytest --cov=mikeio tests --ignore tests/performance/ --ignore tests/notebooks/ --disable-warnings
- name: Test docstrings with doctest
run: make doctest
- name: Static type check
run: make typecheck

deploy:
needs: test
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
Expand Down

0 comments on commit 7ec68b2

Please sign in to comment.