Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add logic to auto update input data #2046

Merged
merged 6 commits into from
Feb 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,26 @@ jobs:
path: ${{ runner.workspace }}/logs
if-no-files-found: ignore

update_input_data:
name: Update input data volumes
runs-on: ubuntu-latest
needs: [job_control]
if: ${{ needs.job_control.outputs.run_unit_tests == 'true' }}
steps:
- uses: dtcenter/metplus-action-data-update@v1
with:
docker_name: ${{ secrets.DOCKER_USERNAME }}
docker_pass: ${{ secrets.DOCKER_PASSWORD }}
repo_name: ${{ github.repository }}
data_prefix: unit_test
branch_name: ${{ needs.job_control.outputs.branch_name }}
docker_data_dir: /data/input/MET_test_data
data_repo_dev: met-data-dev

unit_1a:
name: Unit 1a
runs-on: ubuntu-latest
needs: [job_control, compile]
needs: [job_control, update_input_data, compile]
if: ${{ needs.job_control.outputs.run_unit_tests == 'true' }}
strategy:
matrix:
Expand All @@ -107,7 +123,7 @@ jobs:
env:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
TESTS: ${{ matrix.tests }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}-all

- name: Upload output as artifact
uses: actions/upload-artifact@v2
Expand All @@ -126,7 +142,7 @@ jobs:
unit_1b:
name: Unit 1b
runs-on: ubuntu-latest
needs: [job_control, compile]
needs: [job_control, update_input_data, compile]
if: ${{ needs.job_control.outputs.run_unit_tests == 'true' }}
strategy:
matrix:
Expand All @@ -142,7 +158,7 @@ jobs:
env:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
TESTS: ${{ matrix.tests }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}-all

- name: Upload output as artifact
uses: actions/upload-artifact@v2
Expand All @@ -161,7 +177,7 @@ jobs:
unit_rc_leads:
name: Unit RC leads
runs-on: ubuntu-latest
needs: [job_control, compile]
needs: [job_control, update_input_data, compile]
if: ${{ needs.job_control.outputs.run_unit_tests == 'true' }}
strategy:
matrix:
Expand All @@ -178,7 +194,7 @@ jobs:
env:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
TESTS: ${{ matrix.tests }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}-all

- name: Upload output as artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -261,7 +277,7 @@ jobs:
env:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
TESTS: ${{ matrix.tests }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}-all

- name: Upload output as artifact
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -304,7 +320,7 @@ jobs:
env:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
TESTS: ${{ matrix.tests }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}-all

- name: Upload output as artifact
uses: actions/upload-artifact@v2
Expand Down