Skip to content

Bug fix - cannot have uses and run key #2

Bug fix - cannot have uses and run key

Bug fix - cannot have uses and run key #2

Workflow file for this run

# Tests with pytest the package and monitors the coverage and sends it to coveralls.io
# Coverage is only send to coveralls.io when no pytest tests fail
name: "Tests & Coverage"
on: [push]
# Cancel jobs on new push
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: "${{ matrix.name-suffix }} at py${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name-suffix: "coverage"
os: ubuntu-latest
python-version: 3.11
- name-suffix: "basic"
os: ubuntu-latest
python-version: 3.10
- name-suffix: "basic"
os: ubuntu-latest
python-version: 3.12
- name-suffix: "basic"
os: windows-latest
python-version: 3.11
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
python -m pip install --upgrade pip wheel setuptools
pip install .[dev]
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run:
conda create -n testenv python=${{ matrix.python }}
conda activate testenv
python -m pip install .[dev]
- name: Run tests
if: ${{ !(runner.os == 'Linux' && matrix.python-version == 3.9 && matrix.name-suffix == 'coverage') }}
run: |
python -m pytest --disable-warnings --color=yes -v
- name: Run tests, coverage and send to coveralls
if: runner.os == 'Linux' && matrix.python-version == 3.9 && matrix.name-suffix == 'coverage'
run: |
coverage run --source=windpowerlib -m pytest --disable-warnings --color=yes -v
coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github