Try using reusable workflows

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-10-09 14:44:52 +02:00
parent 205356b848
commit d118b787a2
2 changed files with 23 additions and 8 deletions

16
.github/workflows/build.yml vendored Normal file
View File

@@ -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

View File

@@ -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