diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e6a0e8b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,16 @@ + +name: Reusable build workflow + +on: + workflow_call: + +jobs: + build: + 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43497d8..c3f5285 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,24 +22,23 @@ on: workflow_dispatch: jobs: - build: + test: runs-on: ubuntu-latest + uses: ./.github/workflows/build.yml steps: - name: Checkout repository and submodules uses: actions/checkout@v3 with: submodules: recursive - - name: Build in container - run: ./tests/build-in-docker.sh - test: - runs-on: ubuntu-latest - needs: build - steps: - name: Test PCSC (pytest) run: ./tests/run-test-in-docker.sh test_pkcs11: runs-on: ubuntu-latest - needs: build + uses: ./.github/workflows/build.yml steps: + - name: Checkout repository and submodules + uses: actions/checkout@v3 + with: + submodules: recursive - name: Test PKCS11 run: ./tests/run-test-pkcs11-in-docker.sh