Move input from add_datasets/rose-app.conf to rose-suite.conf
#1940
Workflow file for this run
This file contains hidden or 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
| # (C) Crown Copyright 2022-2025, Met Office. | |
| # The LICENSE.md file contains full licensing details. | |
| # This workflow creates the required Conda environment, performs various | |
| # validation steps for Cylc and Rose, and builds and checks the documentation. | |
| name: default | |
| # Controls when the action will run | |
| on: | |
| # Triggers the workflow on push or pull request events | |
| push: | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run | |
| # sequentially or in parallel | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| # Steps represent a sequence of tasks that will be executed as part | |
| # of the job | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job | |
| # can access it | |
| - uses: actions/checkout@v4 | |
| - name: Create environment | |
| run: | | |
| conda update conda | |
| conda create --name cmew --file .github/workflows/cmew-env/cmew-env.lock | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| - name: Validate Cylc workflow | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| cd CMEW | |
| cylc validate -O metoffice . | |
| - name: Run Cylc configuration linter | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| cd CMEW | |
| cylc lint | |
| - name: Run all Rose validator macros against Rose configuration files | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| cd CMEW | |
| rose macro -V | |
| - name: Validate format of Rose configuration files | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| cd CMEW | |
| output="$(rose config-dump)" | |
| msg="Run 'rose config-dump' to re-dump the Rose configuration files" | |
| msg="${msg} in the common format, then commit the changes." | |
| # The '-z' option returns true if 'output' is empty. | |
| if [[ -z "${output}" ]]; then exit 0; else echo "${msg}" && exit 1; fi | |
| - name: Validate Rose configuration metadata | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| cd CMEW | |
| rose metadata-check -C meta/ | |
| - name: Build documentation | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| cd doc | |
| make html | |
| - name: Check for broken links in the documentation | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| cd doc | |
| make linkcheck | |
| - name: Run pre-commit hooks | |
| run: | | |
| eval "$(conda shell.bash hook)" | |
| conda activate cmew | |
| pre-commit run --all-files | |
| # Find all bash scripts (files with an 'sh' extension) | |
| # and explicitly include the `env` files (which have no extension). | |
| - name: Run ShellCheck | |
| run: | | |
| find . -type f \( -name "*.sh" -or -name "*-env$" \) \ | |
| -exec shellcheck {} \; |