mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-11-04 13:05:54 +00:00
77 lines
2.4 KiB
YAML
77 lines
2.4 KiB
YAML
name: ChangeDetection.io App Test
|
|
|
|
# Triggers the workflow on push or pull request events
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
lint-code:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Lint with Ruff
|
|
run: |
|
|
pip install ruff
|
|
# Check for syntax errors and undefined names
|
|
ruff check . --select E9,F63,F7,F82
|
|
# Complete check with errors treated as warnings
|
|
ruff check . --exit-zero
|
|
- name: Validate OpenAPI spec
|
|
run: |
|
|
pip install openapi-spec-validator
|
|
python3 -c "from openapi_spec_validator import validate_spec; import yaml; validate_spec(yaml.safe_load(open('docs/api-spec.yaml')))"
|
|
|
|
lint-translations:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Check .po files with msgfmt
|
|
run: |
|
|
sudo apt-get install -y gettext
|
|
find changedetectionio/translations -name "*.po" | while read f; do
|
|
echo "Checking $f"
|
|
msgfmt --check-format -o /dev/null "$f"
|
|
done
|
|
|
|
test-application-3-10:
|
|
# Only run on push to master (including PR merges)
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
needs: [lint-code, lint-translations]
|
|
uses: ./.github/workflows/test-stack-reusable-workflow.yml
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
|
|
test-application-3-11:
|
|
# Always run
|
|
needs: [lint-code, lint-translations]
|
|
uses: ./.github/workflows/test-stack-reusable-workflow.yml
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
test-application-3-12:
|
|
# Only run on push to master (including PR merges)
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
needs: [lint-code, lint-translations]
|
|
uses: ./.github/workflows/test-stack-reusable-workflow.yml
|
|
with:
|
|
python-version: '3.12'
|
|
skip-pypuppeteer: true
|
|
|
|
test-application-3-13:
|
|
# Only run on push to master (including PR merges)
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
needs: [lint-code, lint-translations]
|
|
uses: ./.github/workflows/test-stack-reusable-workflow.yml
|
|
with:
|
|
python-version: '3.13'
|
|
skip-pypuppeteer: true
|
|
|
|
|
|
test-application-3-14:
|
|
#if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
needs: [lint-code, lint-translations]
|
|
uses: ./.github/workflows/test-stack-reusable-workflow.yml
|
|
with:
|
|
python-version: '3.14'
|
|
skip-pypuppeteer: false
|