Skip to content

Tests

Tests #38

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- run: make install-tools
- run: make checks
utest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- run: make install-tools
- run: make install-fabric-bins
- run: make testing-docker-images
- run: make unit-tests-race
itest-list:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.targets.outputs.targets }}
steps:
- uses: actions/checkout@v5
- name: list itest targets
id: set-itest-targets
run: |
echo "tests=$(make list-integration-tests | jq -R . | jq -s -c .)" >> $GITHUB_OUTPUT
itest:
needs:
- checks
- utest
- itest-list
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# run all test as listed via `make list-integration-tests`
tests: ${{ fromJson(needs.itest-list.outputs.tests) }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- run: make install-tools
- run: make install-fabric-bins
- run: make docker-images
- name: Set up Fabric-x
if: startsWith(matrix.tests, 'fabricx')
run: |
make fxconfig configtxgen fabricx-docker-images
- name: Set up Softhsm
# we only need this for a subset of integration tests
if: endsWith(matrix.tests, 'hsm')
run: make install-softhsm
- run: make integration-tests-${{ matrix.tests }}