From 33c49a41972bbc0573b93a8aae046cdee79e7abe Mon Sep 17 00:00:00 2001 From: mike dupont Date: Thu, 26 Sep 2024 12:30:30 -0400 Subject: [PATCH] adding test to github matrix --- .github/workflows/run-docker-tests.yml | 32 ++++++++++++-------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/run-docker-tests.yml b/.github/workflows/run-docker-tests.yml index f556007f4..d271944ff 100644 --- a/.github/workflows/run-docker-tests.yml +++ b/.github/workflows/run-docker-tests.yml @@ -15,6 +15,19 @@ on: branches: [ "collect-perf" ] jobs: build: + strategy: + matrix: + tests: + - "/app/src/lib/provable/test/merkle-list.test.ts" + - "/app/src/lib/provable/test/merkle-tree.test.ts" + - "/app/src/lib/provable/test/scalar.test.ts" + - "/app/src/lib/provable/test/merkle-map.test.ts" + - "/app/src/lib/provable/test/provable.test.ts" + - "/app/src/lib/provable/test/primitives.test.ts" + - "/app/src/lib/provable/test/group.test.ts" + - "/app/src/lib/provable/test/int.test.ts" + - "/app/src/lib/mina/precondition.test.ts" + - "/app/src/lib/mina/token.test.ts" runs-on: ubuntu-latest steps: - uses: meta-introspector/checkout@v4 @@ -32,8 +45,7 @@ jobs: run: docker pull ${{ inputs.image_url || env.default_image }} - name: run the Docker tests - run: TESTS="/app/src/lib/provable/test/merkle-list.test.ts" docker compose up ${{ env.container_name }} - # /app/src/lib/provable/test/merkle-tree.test.ts /app/src/lib/provable/test/scalar.test.ts /app/src/lib/provable/test/merkle-map.test.ts /app/src/lib/provable/test/provable.test.ts /app/src/lib/provable/test/primitives.test.ts /app/src/lib/provable/test/group.test.ts /app/src/lib/provable/test/int.test.ts /app/src/lib/mina/precondition.test.ts" + run: TESTS=${{matrix.tests}} docker compose up ${{ env.container_name }} env: DOCKER_IMAGE_URL: ${{ inputs.image_url || env.default_image}} - name: docker cp results @@ -47,23 +59,9 @@ jobs: run: rm -rf /tmp/perf* - name: delete the container run: | - docker-compose down + docker compose down docker rm -f $(docker ps -a -q) - docker volume rm $(docker volume ls -q) - - - name: run the Docker tests part 2 - run: docker compose up ${{ env.container_name }}-test2 - env: - DOCKER_IMAGE_URL: ${{ inputs.image_url || env.default_image}} - - - name: docker cp results - run: docker compose cp ${{ env.container_name }}:/tmp/perf.data.tar.gz perf.data2.tar.gz - - name: Archive results - uses: meta-introspector/upload-artifact@v4 - with: - name: perf.data2.tar.gz - path: perf.data2.tar.gz