From 244b45ddc6eb7e425015909925e47c114f39c1d6 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Fri, 28 Mar 2025 12:24:33 +1100 Subject: [PATCH 1/2] Add test-markers input --- .github/workflows/generate-initial-checksums.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate-initial-checksums.yml b/.github/workflows/generate-initial-checksums.yml index 15ed0181..66870305 100644 --- a/.github/workflows/generate-initial-checksums.yml +++ b/.github/workflows/generate-initial-checksums.yml @@ -20,6 +20,11 @@ on: required: false default: '1.0' description: "If checksums are being committed: The initial version for the git tag associated with the committed checksums." + test-markers: + type: string + required: false + default: repro_historical + description: Test markers to generate checksums, in the form of pytest test marker strings jobs: config: name: Read Testing Configuration @@ -57,7 +62,7 @@ jobs: 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 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 }}`, `test-markers`=`${{ inputs.test-markers }}`.' 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: @@ -74,6 +79,7 @@ jobs: environment-name: "Gadi Initial Checksum" # FIXME: This Environment doesn't nessecarily have to be called this model-config-tests-version: ${{ needs.config.outputs.model-config-tests-version }} payu-version: ${{ needs.config.outputs.payu-version }} + test-markers: ${{ inputs.test-markers }} permissions: contents: write checks: write From 14bb418fc530b95e6836227d82173edfc409aadc Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Fri, 28 Mar 2025 15:09:43 +1100 Subject: [PATCH 2/2] Add committed-checksum-create-release input, remove duplicated jobs, updated referenced workflow inputs, uses PR branch ref --- .../workflows/generate-initial-checksums.yml | 57 ++++--------------- 1 file changed, 10 insertions(+), 47 deletions(-) diff --git a/.github/workflows/generate-initial-checksums.yml b/.github/workflows/generate-initial-checksums.yml index 66870305..730ca0bd 100644 --- a/.github/workflows/generate-initial-checksums.yml +++ b/.github/workflows/generate-initial-checksums.yml @@ -20,65 +20,28 @@ on: required: false default: '1.0' description: "If checksums are being committed: The initial version for the git tag associated with the committed checksums." + committed-checksum-create-release: + type: boolean + required: false + default: false + description: "If checksums are being committed and a tag is being created: Whether to create a GitHub Release for the committed checksums." test-markers: type: string required: false default: repro_historical description: Test markers to generate checksums, in the form of pytest test marker strings jobs: - config: - name: Read Testing Configuration - if: github.repository != 'ACCESS-NRI/model-configs-template' - 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 }}`, `test-markers`=`${{ inputs.test-markers }}`.' - 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 + if: github.repository != 'access-nri/model-config-tests' + uses: access-nri/model-config-tests/.github/workflows/generate-checksums.yml@146-add-marker-input-for-initial-checksums with: config-branch-name: ${{ inputs.config-branch-name }} commit-checksums: ${{ inputs.commit-checksums }} committed-checksum-location: ${{ inputs.committed-checksum-location }} - committed-checksum-tag: "${{ inputs.config-branch-name }}-${{ inputs.committed-checksum-tag-version }}" - environment-name: "Gadi Initial Checksum" # FIXME: This Environment doesn't nessecarily have to be called this - model-config-tests-version: ${{ needs.config.outputs.model-config-tests-version }} - payu-version: ${{ needs.config.outputs.payu-version }} + committed-checksum-tag-version: ${{ inputs.committed-checksum-tag-version }} + committed-checksum-create-release: ${{ inputs.committed-checksum-create-release }} + environment-name: "Gadi Initial Checksum" # FIXME: This Environment doesn't necessarily have to be called this test-markers: ${{ inputs.test-markers }} permissions: contents: write