Fail CI if workflow needs regenerating.

This commit is contained in:
Josh Matthews 2021-05-24 20:19:18 -04:00
parent 3237f3852c
commit 4138d04186
2 changed files with 19 additions and 2 deletions

View file

@ -20,11 +20,13 @@ jobs:
python3 -m pip install --upgrade pip virtualenv
sudo apt update
python3 ./mach bootstrap
- name: Tidy
run: python3 ./mach test-tidy --no-progress --all
- name: Workflow check
run: ./etc/ci/workflow_changed.sh
- name: Release build
run: python3 ./mach build --release
- name: Unit tests
run: python3 ./mach test-unit --release
- name: Tidy
run: python3 ./mach test-tidy --no-progress --all
- name: Lockfile check
run: ./etc/ci/lockfile_changed.sh

15
etc/ci/workflow_changed.sh Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
set -o errexit
set -o nounset
set -o pipefail
python3 etc/ci/generate_workflow.py
diff="$(find . -name 'main.yml' -print0 | xargs -0 git diff)"
echo "${diff}"
[[ -z "${diff}" ]]