SvitloBot: Bump SvitloBot Monitor to 1.5.6 (#20) #144
This file contains 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: Blackout / Validate | |
on: | |
push: | |
pull_request: | |
jobs: | |
changes: | |
name: π Source / Changed | |
runs-on: ubuntu-latest | |
outputs: | |
src: ${{ steps.changes.outputs.src }} | |
python: ${{ steps.changes.outputs.python }} | |
yaml: ${{ steps.changes.outputs.yaml }} | |
steps: | |
- name: β¬οΈ Check out Repo | |
uses: actions/checkout@v4 | |
- name: βοΈ Check for changes | |
uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
python: | |
- '**.py' | |
- 'requirements.txt' | |
yaml: | |
- '**.yaml' | |
- '**.yml' | |
python: | |
name: π§Ή Python Ruff | |
if: ${{ needs.changes.outputs.python == 'true' }} | |
needs: | |
- changes | |
runs-on: ubuntu-latest | |
steps: | |
- name: β¬οΈ Check out Repo | |
uses: actions/checkout@v4 | |
- name: π Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: π¦ Install requirements | |
run: python3 -m pip install -r .github/requirements.txt | |
- name: βοΈ Lint | |
run: python3 -m ruff check . | |
- name: π Format | |
run: python3 -m ruff format . --check | |
- name: π Format Diff | |
if: failure() | |
run: python3 -m ruff format . --check --diff | |
yamllint: | |
name: π§Ή Yaml Lint | |
if: ${{ needs.changes.outputs.yaml == 'true' }} | |
needs: | |
- changes | |
runs-on: ubuntu-latest | |
steps: | |
- name: β€΅οΈ Check out Repo | |
uses: actions/checkout@v4 | |
- name: π Run yamllint | |
run: yamllint --strict . | |
ci-status: | |
name: π Status | |
runs-on: ubuntu-latest | |
needs: | |
- python | |
- yamllint | |
if: always() | |
steps: | |
- name: π Success | |
if: ${{ !(contains(needs.*.result, 'failure')) }} | |
run: exit 0 | |
- name: β Failure | |
if: ${{ contains(needs.*.result, 'failure') }} | |
run: exit 1 |