summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-05-02 12:39:01 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-05 20:24:01 -0400
commitaacb15a3d68216cac0729e15d708be2f13b0eae8 (patch)
tree4f072ca9f3c43ef5455852d22ab9d5c416b681ff
parent962ff90bae1ca336bfa0bf63eea30e33bd344384 (diff)
downloadhaskell-aacb15a3d68216cac0729e15d708be2f13b0eae8.tar.gz
ci: Add job to check that jobs.yaml is up-to-date
There have been quite a few situations where jobs.yaml has been out of date. It's better to add a CI job which checks that it's right. We don't want to use a staged pipeline because it obfuscates the structure of the pipeline.
-rw-r--r--.gitlab-ci.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 57535cd2b7..957259619c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -250,6 +250,28 @@ lint-author:
- if: $CI_MERGE_REQUEST_ID
- *drafts-can-fail-lint
+lint-ci-config:
+ image: "nixos/nix:2.8.0"
+ extends: .lint
+ variables:
+ BUILD_FLAVOUR: default
+ before_script:
+ - mkdir -p ~/.cabal
+ - cp -Rf cabal-cache/* ~/.cabal || true
+ script:
+ - nix shell --extra-experimental-features nix-command --extra-experimental-features flakes nixpkgs#cabal-install -c cabal update
+ - .gitlab/generate_jobs
+ # 1 if .gitlab/generate_jobs changed the output of the generated config
+ - nix shell --extra-experimental-features nix-command --extra-experimental-features flakes nixpkgs#git -c git diff --exit-code
+ after_script:
+ - rm -Rf cabal-cache
+ - cp -Rf ~/.cabal cabal-cache
+ dependencies: []
+ cache:
+ key: lint-ci-$CACHE_REV
+ paths:
+ - cabal-cache
+
lint-submods:
extends: .lint-submods
# Allow failure on merge requests since any necessary submodule patches may