Skip to content

Commit

Permalink
Per #1543, update job control for splitting up the ascii2nc, pb2nc, a…
Browse files Browse the repository at this point in the history
…nd ref_config unit tests. ci-run-unit
  • Loading branch information
JohnHalleyGotway committed Jan 26, 2022
1 parent e22d755 commit 1c75983
Showing 1 changed file with 81 additions and 4 deletions.
85 changes: 81 additions & 4 deletions .github/workflows/pr_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ jobs:
strategy:
matrix:
tests:
- 'ref_config'
- 'tc_dland tc_pairs tc_stat plot_tc tc_rmw rmw_analysis tc_gen'
- 'ascii2nc_indy pb2nc_indy tc_dland tc_pairs tc_stat plot_tc tc_rmw rmw_analysis tc_gen'
- 'met_test_scripts mode_graphics mtd regrid airnow gsi_tools netcdf modis series_analysis gen_ens_prod wwmca_regrid gen_vx_mask grid_weight interp_shape grid_diag grib_tables lidar2nc shift_data_plane trmm2nc aeronet wwmca_plot ioda2nc gaussian'
fail-fast: false
steps:
Expand All @@ -155,6 +154,84 @@ jobs:
path: ${{ runner.workspace }}/logs
if-no-files-found: ignore

unit_tests_ref_config_leads:
name: MET Unit Tests ref_config leads
runs-on: ubuntu-latest
needs: [job_control, compile]
if: ${{ needs.job_control.outputs.run_unit_tests == 'true' }}
strategy:
matrix:
tests:
- 'ref_config_lead_00'
- 'ref_config_lead_12'
- 'ref_config_lead_24'
- 'ref_config_lead_36'
- 'ref_config_lead_48'
fail-fast: false
steps:
- uses: actions/checkout@v2

- name: Run Unit Tests in Docker
run: .github/jobs/run_unit_docker.sh
env:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
TESTS: ${{ matrix.tests }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}

- name: Upload output as artifact
uses: actions/upload-artifact@v2
with:
name: unit_tests_ref_config_leads
path: ${{ runner.workspace }}/output

- name: Upload logs as artifact
if: always()
uses: actions/upload-artifact@v2
with:
name: logs
path: ${{ runner.workspace }}/logs
if-no-files-found: ignore

unit_tests_ref_config:
name: MET Unit Tests ref_config
runs-on: ubuntu-latest
needs: [job_control, unit_tests_ref_config_leads]
if: ${{ needs.job_control.outputs.run_unit_tests == 'true' }}
strategy:
matrix:
tests:
- 'ref_config'
fail-fast: false
steps:
- uses: actions/checkout@v2

- name: Download ref_config_leads output from artifact
uses: actions/download-artifact@v2
with:
name: unit_tests_ref_config_leads
path: ${{ runner.workspace }}/output

- name: Run Unit Tests in Docker
run: .github/jobs/run_unit_docker.sh
env:
SOURCE_BRANCH: ${{ needs.job_control.outputs.branch_name }}
TESTS: ${{ matrix.tests }}
INPUT_DATA_VERSION: ${{ needs.job_control.outputs.input_data_version }}

- name: Upload output as artifact
uses: actions/upload-artifact@v2
with:
name: unit_tests_ref_config
path: ${{ runner.workspace }}/output

- name: Upload logs as artifact
if: always()
uses: actions/upload-artifact@v2
with:
name: logs
path: ${{ runner.workspace }}/logs
if-no-files-found: ignore

unit_tests_2a:
name: MET Unit Tests 2a
runs-on: ubuntu-latest
Expand Down Expand Up @@ -283,7 +360,7 @@ jobs:
run_diffs:
name: Check for Differences
runs-on: ubuntu-latest
needs: [job_control, unit_tests_1b, unit_tests_2b, unit_tests_3a]
needs: [job_control, unit_tests_1b, unit_tests_2b, unit_tests_3a, unit_tests_ref_config]
if: ${{ needs.job_control.outputs.run_diff == 'true' }}
steps:
- name: Download data from previous jobs
Expand Down Expand Up @@ -322,7 +399,7 @@ jobs:
update_truth:
name: Update Truth Data
runs-on: ubuntu-latest
needs: [job_control, unit_tests_1b, unit_tests_2b, unit_tests_3a]
needs: [job_control, unit_tests_1b, unit_tests_2b, unit_tests_3a, unit_tests_ref_config]
if: ${{ needs.job_control.outputs.run_update_truth == 'true' }}
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 1c75983

Please sign in to comment.