Skip to content

Commit

Permalink
Merge pull request #117 from ACCESS-NRI/model-config-tests-23-remove-…
Browse files Browse the repository at this point in the history
…infra

Removal of CI/CD Infrastructure
  • Loading branch information
CodeGat authored Jun 19, 2024
2 parents 768c114 + 5a2cce6 commit 0e6c9b6
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 990 deletions.
40 changes: 0 additions & 40 deletions .github/actions/parse-ci-config/README.md

This file was deleted.

53 changes: 0 additions & 53 deletions .github/actions/parse-ci-config/action.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/call-pr-1-ci.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/call-pr-3-bump-tag.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI
run-name: CI (${{ github.event_name }}) for ${{ github.ref_name }}
on:
pull_request:
branches:
- 'release-*'
- 'dev-*'
paths-ignore:
# These are ignored because they don't have anything to do with the model itself
- .github/**
- tools/**
- doc/**
- config/**
- .*
- README.md
push:
branches:
- 'release-*'
paths:
- 'metadata.yaml'
issue_comment:
types:
- created
- edited
jobs:
pr:
name: PR
if: github.event_name == 'pull_request'
uses: access-nri/model-config-tests/.github/workflows/config-pr-1-ci.yml@main
secrets: inherit
permissions:
contents: write
pull-requests: write # For pull request comments denoting failure of the workflow
checks: write

pr-comment:
name: Comment
if: github.event_name == 'issue_comment'
uses: access-nri/model-config-tests/.github/workflows/config-pr-2-confirm.yml@main
secrets: inherit
permissions:
contents: write # For updating metadata.yaml version and committing checksums
pull-requests: write # For commenting on PR

bump-tag:
name: Tag Bump
if: github.event_name == 'push'
uses: access-nri/model-config-tests/.github/workflows/config-pr-3-bump-tag.yml@main
secrets: inherit
permissions:
contents: write # For creating a new release
26 changes: 26 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI Config
run-name: CI Config
on:
pull_request:
branches:
- main
paths:
- config/**
jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- name: Logging Validation Inputs
run: echo '::notice::Validating config/ci.json with ${{ vars.CI_JSON_SCHEMA_VERSION }}'

- name: Checkout CI Config
uses: actions/checkout@v4

- name: config/ci.json
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
30 changes: 20 additions & 10 deletions .github/workflows/generate-initial-checksums.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ on:
default: '1.0'
description: "If checksums are being committed: The initial version for the git tag associated with the committed checksums."
jobs:
log-inputs:
name: Log Inputs
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 }}`.'
config:
name: Read Testing Configuration
runs-on: ubuntu-latest
Expand All @@ -40,22 +33,39 @@ jobs:
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/access-om2-configs/.github/actions/parse-ci-config@main
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 Python Version ${{ needs.config.outputs.python-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/reproducibility/.github/workflows/generate-initial-checksums.yml@main
uses: access-nri/model-config-tests/.github/workflows/generate-checksums.yml@main
with:
model-name: access-om2
config-branch-name: ${{ inputs.config-branch-name }}
commit-checksums: ${{ inputs.commit-checksums }}
committed-checksum-location: ${{ inputs.committed-checksum-location }}
Expand Down
Loading

0 comments on commit 0e6c9b6

Please sign in to comment.