Skip to content

165: Add workflow-level option support #379

165: Add workflow-level option support

165: Add workflow-level option support #379

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
standard:
name: Lint and test
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies for linting
run: pip install '.[dev]'
- name: Lint
run: pre-commit run --all-files
- name: Install dependencies for testing
run: pip install '.[test]'
- name: Test
run: pytest
codecov:
name: Codecov
needs:
- standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install
run: pip install '.[test]'
- name: Test
run: pytest --cov=stactask
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
fail_ci_if_error: false
docs:
name: Docs
needs:
- standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install
run: pip install . -r docs/requirements.txt
- name: Make docs
run: cd docs && make html