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