From 1b85b94469c86e262b59c1e4e2c250002b021dd7 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 27 Oct 2023 02:54:08 -0400 Subject: [PATCH 1/5] ci: automatically get list of datasets to check --- .github/workflows/ci.yml | 26 ++++++++++++++++---------- README.md | 1 - 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd223d6..325f7d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,21 +16,27 @@ concurrency: jobs: + # get list of datasets to check + get_datasets: + runs-on: ubuntu-latest + outputs: + datasets: ${{ steps.datasets.outputs.datasets }} + steps: + - name: checkout + uses: actions/checkout@v3 + - name: get data sets + id: datasets + working-directory: qadb + run: echo datasets=(ls -d pass*/* | jq -Rcs '{"dataset": split("\n")[:-1]}') >> $GITHUB_OUTPUT + # check consistency between Groovy and C++ APIs groovy_vs_cpp: + needs: + - get_datasets runs-on: ubuntu-latest strategy: fail-fast: true - matrix: - dataset: - - pass1/rga_fa18_inbending - - pass1/rga_fa18_outbending - - pass1/rga_sp19 - - pass1/rgb_fa19 - - pass1/rgb_sp19 - - pass1/rgb_wi20 - - pass1/rgk_fa18_6.5GeV - - pass1/rgk_fa18_7.5GeV + matrix: ${{ fromJson(needs.get_datasets.outputs.datasets) }} steps: - name: checkout uses: actions/checkout@v3 diff --git a/README.md b/README.md index 572aa17..21faba6 100644 --- a/README.md +++ b/README.md @@ -260,7 +260,6 @@ Documentation for QADB maintenance and revision * run `bin/makeTables.sh` * run `bin/makeTextFiles.sh` * update customized QA criteria sets, such as `OkForAsymmetry` - * add any new dataset to the CI tests: `.github/workflows/ci.yml` * add/update a symlink to this dataset in `qadb/latest`, if this is a new Pass * update the above table of data sets * use `git status` and `git diff` to review changes, then add and commit to From 9a704ca4707400dc67becb40dd926a2dd31dd723 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 27 Oct 2023 02:57:23 -0400 Subject: [PATCH 2/5] fix: `run:` string --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 325f7d0..2ad8add 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,8 @@ jobs: - name: get data sets id: datasets working-directory: qadb - run: echo datasets=(ls -d pass*/* | jq -Rcs '{"dataset": split("\n")[:-1]}') >> $GITHUB_OUTPUT + run: | + echo datasets=(ls -d pass*/* | jq -Rcs '{"dataset": split("\n")[:-1]}') >> $GITHUB_OUTPUT # check consistency between Groovy and C++ APIs groovy_vs_cpp: From cfa49a781e1bb4f920a497379e74acdcbc370200 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 27 Oct 2023 02:59:25 -0400 Subject: [PATCH 3/5] fix: typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ad8add..ad415b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: id: datasets working-directory: qadb run: | - echo datasets=(ls -d pass*/* | jq -Rcs '{"dataset": split("\n")[:-1]}') >> $GITHUB_OUTPUT + echo datasets=$(ls -d pass*/* | jq -Rcs '{"dataset": split("\n")[:-1]}') >> $GITHUB_OUTPUT # check consistency between Groovy and C++ APIs groovy_vs_cpp: From f31236bd933dd34aa38fac7a8d798757ef5c238a Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 27 Oct 2023 03:07:47 -0400 Subject: [PATCH 4/5] feat: add to summary --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad415b3..a560238 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,12 @@ jobs: id: datasets working-directory: qadb run: | - echo datasets=$(ls -d pass*/* | jq -Rcs '{"dataset": split("\n")[:-1]}') >> $GITHUB_OUTPUT + ls -d pass*/* | jq -Rs '{"dataset": split("\n")[:-1]}') > list.json + echo "### List of Datasets" >> $GITHUB_STEP_SUMMARY + echo '```json' >> $GITHUB_STEP_SUMMARY + cat list.json | xargs -0 -I{} echo {} >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + echo datasets=$(jq -c . list.json) >> $GITHUB_OUTPUT # check consistency between Groovy and C++ APIs groovy_vs_cpp: From c43cbc0d79325fcdf044d57bae0768a9c862ed2d Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Fri, 27 Oct 2023 03:09:23 -0400 Subject: [PATCH 5/5] fix: typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a560238..04e0be5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: id: datasets working-directory: qadb run: | - ls -d pass*/* | jq -Rs '{"dataset": split("\n")[:-1]}') > list.json + ls -d pass*/* | jq -Rs '{"dataset": split("\n")[:-1]}' > list.json echo "### List of Datasets" >> $GITHUB_STEP_SUMMARY echo '```json' >> $GITHUB_STEP_SUMMARY cat list.json | xargs -0 -I{} echo {} >> $GITHUB_STEP_SUMMARY