Skip to content

Move resources to top level directory #2

Move resources to top level directory

Move resources to top level directory #2

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint
name: status
on:
push:
branches: [ main ]
paths:
- '**/*.toml'
- '**/*.py'
- '.github/workflows/*'
pull_request:
branches: [ main ]
paths:
- '**/*.toml'
- '**/*.py'
- '.github/workflows/*'
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '25 9 * * 2'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- 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
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install flake8
pip install -e .[testing]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Run pytest
run: pytest
- name: Test mu.py
run: |
pip install -e .[resources]
./resources/mu.py -o fake/path/mymudet.pkl --plight pl_step_1000 mmc/ice_allm97.pklz
pytest -k test_pdet
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [build]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}