Skip to content

Check scripts

Check scripts #424

Workflow file for this run

name: Check scripts
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
- cron: '0 */3 * * *' # every 3 hours
permissions:
contents: read
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
env:
# To avoid uv warning about cache
UV_LINK_MODE: copy
WORKSPACE: "${{ github.workspace }}/workspace"
VERBOSE: "true"
jobs:
# General python checks
python-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup runner
uses: ./.github/actions/runner-setup
- name: Check licenses
run: uv run licensecheck --zero
- name: Check formatting
run: uv format --check
# Check server update script
check-server:
uses: ./.github/workflows/update-server.yaml
strategy:
fail-fast: false
matrix:
# TODO: return v31.0 when ready
protocol_version: ["v30.2"]
# protocol_version: ["v30.2", "v31.0"]
with:
protocol_version: "${{ matrix.protocol_version }}"
secrets: inherit
# Check verification keys update script
check-vk:
uses: ./.github/workflows/update-vk.yaml
strategy:
fail-fast: false
matrix:
protocol_version: ["v30.2", "v31.0"]
with:
protocol_version: "${{ matrix.protocol_version }}"
secrets: inherit
# Report to Slack if any of the scheduled jobs failed
report-slack:
runs-on: ubuntu-latest
if: failure() && github.event_name == 'schedule'
needs:
- check-vk
- check-server
steps:
- name: Checkout repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Slack notification
uses: ./.github/actions/notify-slack
with:
webhook: ${{ secrets.SLACK_WEBHOOK }}
context: "Possible incompatibility in protocol upgrade scripts."
# Special job that allows some of the jobs to be skipped or failed
# requiring others to be successful
pr-checks:
runs-on: ubuntu-latest
if: always()
needs:
- python-checks
- check-server
- check-vk
steps:
- name: Decide on PR checks
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}