diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index 6109ab95..7d60214c 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -16,7 +16,17 @@ jobs: needs: [pre-commit, spdx] uses: ./.github/workflows/run-build.yml secrets: inherit + collect_dirs: + runs-on: ubuntu-latest + outputs: + dirs: ${{ steps.dirs.outputs.dirs }} + steps: + - uses: actions/checkout@v2 + - id: dirs + run: echo "dirs=$(ls -d tests/models/*/ | jq --raw-input --slurp --compact-output 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT} test: - needs: build + needs: [build, collect_dirs] + strategy: + matrix: { dir: ${{ fromJson(needs.collect_dirs.outputs.dirs) }} } uses: ./.github/workflows/run-tests.yml secrets: inherit diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b6789ce3..89c68246 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -75,11 +75,4 @@ jobs: run: | source env/activate export LD_LIBRARY_PATH="/opt/ttmlir-toolchain/lib/:${{ steps.strings.outputs.install-output-dir }}/lib:${{ steps.strings.outputs.build-output-dir }}/lib:./lib/:${LD_LIBRARY_PATH}" - pytest -v tests/torch - - - name: Run ONNX tests - shell: bash - run: | - source env/activate - export LD_LIBRARY_PATH="/opt/ttmlir-toolchain/lib/:${{ steps.strings.outputs.install-output-dir }}/lib:${{ steps.strings.outputs.build-output-dir }}/lib:./lib/:${LD_LIBRARY_PATH}" - pytest -v tests/onnx + pytest -v ${{ matrix.dir }}