From 1c759831606b4ffa5f828415e39dd79c5ee92d7e Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 26 Jan 2022 12:32:23 -0700 Subject: [PATCH] Per #1543, update job control for splitting up the ascii2nc, pb2nc, and ref_config unit tests. ci-run-unit --- .github/workflows/pr_unit_tests.yml | 85 +++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_unit_tests.yml b/.github/workflows/pr_unit_tests.yml index 0932bfcf86..8dada58861 100644 --- a/.github/workflows/pr_unit_tests.yml +++ b/.github/workflows/pr_unit_tests.yml @@ -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: @@ -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 @@ -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 @@ -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