Skip to content

doc: QA ground rules (#59) #175

doc: QA ground rules (#59)

doc: QA ground rules (#59) #175

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
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@v4
- name: get data sets
id: datasets
working-directory: qadb
run: |
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:
needs:
- get_datasets
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix: ${{ fromJson(needs.get_datasets.outputs.datasets) }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: setup_groovy
uses: wtfjoke/setup-groovy@v2
with:
groovy-version: 4.x
- name: env
run: |
source environ.sh
echo "QADB=${QADB}" >> $GITHUB_ENV
echo "JYPATH=${JYPATH}" >> $GITHUB_ENV
- name: compile_cpp_tests
run: |
cd srcC/tests
make
- name: test_diff_groovy_cpp
run: |
tests/test_diffGroovyCpp.loop.sh ${{matrix.dataset}}
- name: concatenate_artifacts
id: artifacts
run: |
mkdir -p artifacts/${{matrix.dataset}}
for lang in cpp groovy ; do
cat tmp/${lang}*.out > artifacts/${{matrix.dataset}}/${lang}.txt ;
done
echo "artifact_name=groovy_vs_cpp__$(echo ${{matrix.dataset}} | sed 's;/;_;g')" | tee -a $GITHUB_OUTPUT
- name: upload_artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifacts.outputs.artifact_name }}
retention-days: 3
path: artifacts/*
# report status for github status check (successful only if all `groovy_vs_cpp` jobs pass)
report:
runs-on: ubuntu-latest
needs:
- groovy_vs_cpp
steps:
- run: echo success