Skip to content

Commit

Permalink
Merge pull request #55 from ACCESS-NRI/model-config-tests-37-payu-ver…
Browse files Browse the repository at this point in the history
…sion-config

`config/ci.json`: Added global default `payu-version` `1.1.4`
  • Loading branch information
CodeGat authored Aug 22, 2024
2 parents 5fdeec8 + 406b4f6 commit 0023a79
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/generate-initial-checksums.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
if: github.repository != 'ACCESS-NRI/model-configs-template'
runs-on: ubuntu-latest
outputs:
python-version: ${{ steps.repro-config.outputs.python-version }}
payu-version: ${{ steps.repro-config.outputs.payu-version }}
model-config-tests-version: ${{ steps.repro-config.outputs.model-config-tests-version }}
steps:
- name: Checkout main
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
steps:
- run: |
echo '::notice::This deployment is using the following inputs: `config-branch-name`=`${{ inputs.config-branch-name }}`, `commit-checksums`=`${{ inputs.commit-checksums }}`, `committed-checksum-location`=`${{ inputs.committed-checksum-location }}`,`committed-checksum-tag-version`=`${{ inputs.committed-checksum-tag-version }}`.'
echo '::notice::This deployment is using Python Version ${{ needs.config.outputs.python-version }} and Model Config Tests Version ${{ needs.config.outputs.model-config-tests-version }}'
echo '::notice::This deployment is using Payu Version ${{ needs.config.outputs.payu-version }} and Model Config Tests Version ${{ needs.config.outputs.model-config-tests-version }}'
generate-checksums:
name: Generate Checksums
Expand All @@ -72,7 +72,7 @@ jobs:
committed-checksum-tag: "${{ inputs.config-branch-name }}-${{ inputs.committed-checksum-tag-version }}"
environment-name: "Gadi Initial Checksum"
model-config-tests-version: ${{ needs.config.outputs.model-config-tests-version }}
python-version: ${{ needs.config.outputs.python-version }}
payu-version: ${{ needs.config.outputs.payu-version }}
permissions:
contents: write
secrets: inherit
5 changes: 3 additions & 2 deletions README-DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ This is the `config/ci.json` configuration file for specifying different test ma
- `reproducibility`: Reproducibility tests that are run as part of pull requests. The keys under these tests represent the target branches into which pull requests are being merged.
- `qa` - Quick quality assurance tests that are run as part of pull requests. The keys under these tests represent the target branches into which pull requests are being merged.

The configuration properties needed to run the tests are:
The configuration properties needed to run the tests are

| Name | Type | Description | Example |
| ---- | ---- | ----------- | -------- |
| markers | `string` | Markers used for the pytest checks, in the python format | `checksum` |
| model-config-tests-version | `string` | The version of the model-config-tests | `0.0.1` |
| python-version | `string` | The python version used to create test virtual environment | `3.11.0` |
| python-version | `string` | The python version used to create test virtual environment on Github hosted tests | `3.11.0` |
| payu-version | `string` | The Payu version used to run the model | `1.1.4` |

As most of the tests use the same test and python versions, and similar markers, there are two levels of defaults. There's a default at test type level which is useful for defining test markers - this selects certain pytests to run in `model-config-tests`. There is an outer global default, which is used if a property is not defined for a given branch/tag, and it is not defined for the test default. The `parse-ci-config` action applies the fall-back default logic. For more information on using this action see [`ACCESS-NRI/model-config-tests`](https://github.com/ACCESS-NRI/model-config-tests/).

Expand Down
5 changes: 3 additions & 2 deletions config/ci.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://github.com/ACCESS-NRI/schema/tree/main/au.org.access-nri/model/configuration/ci/1-0-0.json",
"$schema": "https://github.com/ACCESS-NRI/schema/tree/main/au.org.access-nri/model/configuration/ci/2-0-0.json",
"scheduled": {
"default": {
"markers": "checksum"
Expand All @@ -17,6 +17,7 @@
},
"default": {
"model-config-tests-version": "0.0.7",
"python-version": "3.11.0"
"python-version": "3.11.0",
"payu-version": "1.1.4"
}
}

0 comments on commit 0023a79

Please sign in to comment.