From c97680772d9f06fd894d303bf9de4a4166b2769f Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 9 Oct 2023 16:36:37 +0200 Subject: [PATCH] Use artifacts Signed-off-by: Pol Henarejos --- .github/workflows/test.yml | 46 +++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a40c61f..46a2962 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,16 +23,60 @@ on: jobs: build: - uses: ./.github/workflows/build.yml + runs-on: ubuntu-latest + steps: + - name: Checkout repository and submodules + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Build in container + run: ./tests/build-in-docker.sh + - name: Export image + run: | + mkdir -p artifacts + docker save pico-hsm-test:bullseye -o artifacts/docker-image.tar + - name: Temporarily save image + uses: actions/upload-artifact@v2 + with: + name: docker-artifact + path: artifacts + retention-days: 1 + test: runs-on: ubuntu-latest needs: build steps: + - name: Checkout repository and submodules + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Retrieve saved image + uses: actions/download-artifact@v2 + with: + name: docker-artifact + path: artifacts + - name: Load image + run: | + cd artifacts + docker load -q -i docker-image.tar - name: Test PCSC (pytest) run: ./tests/run-test-in-docker.sh test_pkcs11: runs-on: ubuntu-latest needs: build steps: + - name: Checkout repository and submodules + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Retrieve saved image + uses: actions/download-artifact@v2 + with: + name: docker-artifact + path: artifacts + - name: Load image + run: | + cd artifacts + docker load -q -i docker-image.tar - name: Test PKCS11 run: ./tests/run-test-pkcs11-in-docker.sh