Skip to content

Prometheus (including config), Grafana dashboard config #191

Prometheus (including config), Grafana dashboard config

Prometheus (including config), Grafana dashboard config #191

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
strategy:
matrix:
directory: ['api', 'xythrion']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "${{ matrix.directory }}/pyproject.toml"
- name: Set up PDM
uses: pdm-project/setup-pdm@v2
with:
python-version: "3.11"
- name: Install dependencies
working-directory: ${{ matrix.directory }}
run: pdm sync
- name: Run lints
working-directory: ${{ matrix.directory }}
run: pdm lint
- name: Run tests
working-directory: ${{ matrix.directory }}
# Matplotlib tests are currently broken, skipping for now.
run: |
if [ "${{ matrix.directory }}" != 'api' ]; then
pdm test
else
echo "Skipping tests for 'api' directory."
fi
- name: Prepare Pull Request Payload artifact
working-directory: ${{ matrix.directory }}
id: prepare-artifact
if: always() && github.event_name == 'pull_request'
continue-on-error: true
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
- name: Upload a Build Artifact
if: always() && steps.prepare-artifact.outcome == 'success'
continue-on-error: true
uses: actions/upload-artifact@v3
with:
working-directory: ${{ matrix.directory }}
name: pull-request-payload
path: pull_request_payload.json