diff --git a/.github/workflows/full_test.yml b/.github/workflows/full_test.yml index 3eda9b3f0..f07b81242 100644 --- a/.github/workflows/full_test.yml +++ b/.github/workflows/full_test.yml @@ -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: diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index e011f10ad..e48a69dbb 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -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