Files
meshcore-exporter/.gitea/workflows/ci.yml
T
renovate-bot 885cdc5376
pr-check / dependencies (pull_request) Successful in 5s
pr-check / build (pull_request) Successful in 1m1s
ci / test (push) Successful in 1m27s
ci / test (pull_request) Successful in 2m15s
Update catthehacker/ubuntu:act-24.04 Docker digest to ebfc275
2026-11-22 20:53:47 +00:00

56 lines
1.5 KiB
YAML

# Lint + tests on every push and PR; the image is built by image.yml.
name: ci
"on":
push:
pull_request:
workflow_dispatch:
env:
RUFF_VERSION: "0.15.7"
MYPY_VERSION: "1.19.1"
YAMLLINT_VERSION: "1.38.0"
jobs:
test:
runs-on: ubuntu-latest
# The 26.04 image (act-latest) makes setup-python fetch a Python built for
# a newer CPU than swarm-runner has ("CPU ISA level is lower than
# required"); on 24.04 it fetches one that runs there.
container:
image: catthehacker/ubuntu:act-24.04@sha256:ebfc2752875ebb29fbfa360db9dcd2f76bc160147ec6bd1b035bba0ef8b38fbe
steps:
- uses: actions/checkout@v7
- name: gitleaks
uses: https://git.rfa.cz/tth-pub/ci-actions/gitleaks@v15
with:
mode: block
- uses: actions/setup-python@v7
with:
python-version: "3.15"
- name: Install
run: |
set -euo pipefail
python -m pip install --quiet -r requirements.txt pytest \
"ruff==$RUFF_VERSION" "mypy==$MYPY_VERSION" "yamllint==$YAMLLINT_VERSION"
- name: Lint
run: |
set -euo pipefail
ruff check .
ruff format --check .
mypy meshcore_exporter.py
yamllint stack .gitea .yamllint
- name: Dashboard is generated from generate.py
run: |
set -euo pipefail
python dashboards/generate.py
git diff --exit-code dashboards/
- name: Tests
run: python -m pytest -q