refactor: externalize package changes and branches to auto-reloading YAML #1797
Workflow file for this run
This file contains hidden or 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: Test Pull Request | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| TERM: xterm-color | |
| PY_COLORS: 1 | |
| LOG_LEVEL: DEBUG | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| name: Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Display Python version | |
| run: python -c "import sys; print(sys.version)" | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Validate YAML config files | |
| run: | | |
| uv run python -c " | |
| import json, yaml, jsonschema | |
| for yaml_file, schema_file in [ | |
| ('package_changes.yaml', 'package_changes_schema.json'), | |
| ('branches.yaml', 'branches_schema.json'), | |
| ]: | |
| with open(schema_file) as f: | |
| schema = json.load(f) | |
| with open(yaml_file) as f: | |
| data = yaml.safe_load(f) | |
| jsonschema.validate(data, schema) | |
| print(f'{yaml_file}: OK') | |
| " | |
| - name: Lint with ruff | |
| run: uv run ruff check . | |
| - name: Stylecheck with ruff | |
| run: uv run ruff format --check . | |
| - name: Test with pytest | |
| run: | | |
| export CONTAINER_SOCKET_PATH="/tmp/podman.sock" | |
| podman system service --time=0 "unix://$CONTAINER_SOCKET_PATH" & | |
| uv run coverage run -m pytest -vv --runslow | |
| uv run coverage xml | |
| - name: Codecov | |
| uses: codecov/codecov-action@v4 |