45 lines
931 B
YAML
45 lines
931 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install tooling
|
|
run: |
|
|
python -m pip install -U pip
|
|
pip install pytest
|
|
|
|
- name: Install project (if pyproject exists)
|
|
run: |
|
|
if [ -f pyproject.toml ]; then
|
|
pip install -e .
|
|
fi
|
|
|
|
- name: Lint (ruff)
|
|
run: ruff check .
|
|
|
|
- name: Tests (pytest)
|
|
run: pytest -q
|
|
|
|
- name: Build scripts bundle (CI artifact)
|
|
run: |
|
|
mkdir -p dist
|
|
zip -r dist/SDSAT-scripts.zip scripts pyproject.toml requirements.txt
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: SDSAT-scripts
|
|
path: dist/SDSAT-scripts.zip
|