Quantify wind speed shift #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
lint-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.x"] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "set up Python ${{ matrix.python-version }}" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v4 | |
id: cache-venv | |
with: | |
path: ./.venv/ | |
key: ${{ matrix.python-version }}-venv-${{ hashFiles('**/pyproject.toml') }} | |
restore-keys: | | |
${{ matrix.python-version }}-venv | |
- name: 'create environment and install dependencies' | |
if: steps.cache-venv.outputs.cache-hit != 'true' | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
pip install .[all] | |
- name: 'update dependencies' | |
if: steps.cache-venv.outputs.cache-hit == 'true' | |
run: | | |
source .venv/bin/activate | |
pip install -U .[all] | |
- name: "lint check & test" | |
run: | | |
source .venv/bin/activate | |
poe lint-check | |
poe test | |
- if: ${{ matrix.python-version != '3.9' }} | |
name: 'Run notebook and output to html' | |
run: | | |
source .venv/bin/activate | |
poe smarteole-nb-to-html | |
- if: ${{ matrix.python-version != '3.9' }} | |
name: 'Upload notebook html as artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: smarteole-notebook-html | |
path: examples/smarteole_example.html |