-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add User-Dispatchable Repro Tests (#121)
* Added initial ci.json configuration file * Added initial checksum generation workflow * README.md: Updated to include reference to `config/ci.json` and user dispatch workflows * README.md: Fixed markdown linting errors * Update README.md Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com> --------- Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com>
- Loading branch information
1 parent
7de31c4
commit 5a82b21
Showing
3 changed files
with
142 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Generate Initial Checksums | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
config-branch-name: | ||
type: string | ||
required: true | ||
description: The configuration branch that will be run that will generate the checksums. | ||
commit-checksums: | ||
type: boolean | ||
required: true | ||
description: Commit the checksums to the target branch once generated. They will still be stored as a workflow artifact. | ||
committed-checksum-location: | ||
type: string | ||
required: false | ||
default: ./testing/checksum | ||
description: "If checksums are being committed: Where in the repository the generated checksums should be committed to." | ||
committed-checksum-tag-version: | ||
type: string | ||
required: false | ||
description: "If checksums are being committed: The initial version for the git tag associated with the committed checksums." | ||
jobs: | ||
config: | ||
name: Read Testing Configuration | ||
runs-on: ubuntu-latest | ||
outputs: | ||
payu-version: ${{ steps.repro-config.outputs.payu-version }} | ||
model-config-tests-version: ${{ steps.repro-config.outputs.model-config-tests-version }} | ||
steps: | ||
- name: Checkout main | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
|
||
- name: Validate | ||
uses: access-nri/schema/.github/actions/validate-with-schema@main | ||
with: | ||
schema-version: ${{ vars.CI_JSON_SCHEMA_VERSION }} | ||
meta-schema-version: draft-2020-12 | ||
schema-location: au.org.access-nri/model/configuration/ci | ||
data-location: config/ci.json | ||
|
||
- name: Read reproducibility tests config | ||
id: repro-config | ||
uses: access-nri/model-config-tests/.github/actions/parse-ci-config@main | ||
with: | ||
check: reproducibility | ||
branch-or-tag: ${{ inputs.config-branch-name }} | ||
config-filepath: "config/ci.json" | ||
|
||
log-inputs: | ||
name: Log Inputs | ||
needs: | ||
- config | ||
runs-on: ubuntu-latest | ||
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 Payu Version ${{ needs.config.outputs.payu-version }} and Model Config Tests Version ${{ needs.config.outputs.model-config-tests-version }}' | ||
generate-checksums: | ||
name: Generate Checksums | ||
needs: | ||
- log-inputs | ||
- config | ||
uses: access-nri/model-config-tests/.github/workflows/generate-checksums.yml@main | ||
with: | ||
config-branch-name: ${{ inputs.config-branch-name }} | ||
commit-checksums: ${{ inputs.commit-checksums }} | ||
committed-checksum-location: ${{ inputs.committed-checksum-location }} | ||
committed-checksum-tag: ${{ inputs.committed-checksum-tag-version != '' && format('{0}-{1}', 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 }} | ||
payu-version: ${{ needs.config.outputs.payu-version }} | ||
permissions: | ||
contents: write | ||
secrets: inherit |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"$schema": "https://github.com/ACCESS-NRI/schema/tree/main/au.org.access-nri/model/configuration/ci/2-0-0.json", | ||
"scheduled": { | ||
"default": { | ||
"markers": "checksum" | ||
} | ||
}, | ||
"reproducibility": { | ||
"default": { | ||
"markers": "checksum" | ||
} | ||
}, | ||
"qa": { | ||
"default": { | ||
"markers": "access_om3 or config" | ||
} | ||
}, | ||
"default": { | ||
"model-config-tests-version": "0.0.7", | ||
"python-version": "3.11.0", | ||
"payu-version": "1.1.5" | ||
} | ||
} |