add metadata for saldo analysis #109
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: CI | |
on: [push, pull_request] | |
jobs: | |
checks: | |
name: ${{ matrix.task.name }} py-${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 4 | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest] | |
task: | |
- name: Run tests | |
run: | | |
source venv/bin/activate | |
pytest -m noexternal | |
steps: | |
- name: Checkout code | |
uses: nschloe/action-cached-lfs-checkout@v1 | |
- name: Set up Python ${{ matrix.python-version }} | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Load cached venv if cache exists | |
- name: Load cached venv | |
id: cached-dependencies | |
uses: actions/[email protected] | |
with: | |
path: venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('.github/workflows/ci.yml') }} | |
# Create virtual environment and install dependencies if cache does not exist | |
- name: Create venv and install dependencies | |
if: steps.cached-dependencies.outputs.cache-hit != 'true' | |
run: | | |
python3 -m venv venv | |
source venv/bin/activate | |
pip install -e .[dev] | |
- name: Setup Sparv | |
run: | | |
source venv/bin/activate | |
sparv setup -d $PWD | |
- name: ${{ matrix.task.name }} | |
run: ${{ matrix.task.run }} |