Skip to content

chore(deps): update bot deps (#1659) #5544

chore(deps): update bot deps (#1659)

chore(deps): update bot deps (#1659) #5544

Workflow file for this run

name: Tests
on:
push:
branches: [main]
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
pull_request:
branches: [main]
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- '.gitignore'
workflow_dispatch:
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- run: make -j2 install-tools install-linter-tool
- run: make checks
utest:
needs:
- checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- run: make install-fabric-bins
- name: unit-tests
run: |
GO_TEST_PARAMS="-race -coverprofile=coverage.profile" make unit-tests
./scripts/filter-coverage.sh coverage.profile coverage.profile
- uses: coverallsapp/github-action@v2
with:
file: coverage.profile
flag-name: utest
parallel: true
fail-on-error: false
utest-postgres:
needs:
- checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- run: make pull-images-database
- name: unit-tests-postgres
run: |
GO_TEST_PARAMS="-race -coverprofile=coverage.profile" make unit-tests-postgres
./scripts/filter-coverage.sh coverage.profile coverage.profile
- uses: coverallsapp/github-action@v2
with:
file: coverage.profile
flag-name: utest-postgres
parallel: true
fail-on-error: false
itest-list:
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.set-itest-tests.outputs.tests }}
steps:
- uses: actions/checkout@v6
- name: list itest targets
id: set-itest-tests
run: |
echo "tests=$(make list-integration-tests | jq -R . | jq -s -c .)" >> $GITHUB_OUTPUT
itest:
needs:
- checks
- 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@v6
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- name: Install ginkgo
run: cd tools && go install github.com/onsi/ginkgo/v2/ginkgo
- name: Set up Fabric
if: startsWith(matrix.tests, 'fabric-')
run: |
make -j4 install-fabric-bins pull-images-fabric pull-images-database
- name: Set up Fabric-x
if: startsWith(matrix.tests, 'fabricx-')
run: |
make -j4 install-fabricx-tools pull-images-fabricx
- name: Set up Softhsm
# we only need this for a subset of integration tests
if: endsWith(matrix.tests, 'hsm')
run: |
make install-softhsm
./ci/scripts/setup_softhsm.sh
- name: Set up monitoring
# we only need this for a subset of integration tests
if: contains(fromJSON('["fabric-iou", "fabric-runtimeconfig", "fsc-stoprestart"]'), matrix.tests)
run: |
make -j4 pull-images-monitoring
- name: Run the integration test
run: |
mkdir -p covdata
GOCOVERDIR=$(realpath covdata) make integration-tests-${{ matrix.tests }}
go tool covdata textfmt -i=covdata -o coverage.profile
./scripts/filter-coverage.sh coverage.profile coverage.profile
- uses: coverallsapp/github-action@v2
with:
file: coverage.profile
flag-name: itest-${{ matrix.tests }}
parallel: true
fail-on-error: false
publish-coverage:
needs:
- utest
- utest-postgres
- itest
runs-on: ubuntu-latest
steps:
# Close the parallel Coveralls build. Every test job in this run reports a
# flag (the itest matrix has no job-level skips), so all flags are present
# and no `carryforward` is needed. Omitting carryforward is deliberate: it
# previously masked missing integration-test jobs by silently reusing a
# prior build's coverage, so an incomplete run reported a stale-but-
# plausible number instead of an obviously low one.
- uses: coverallsapp/github-action@v2
with:
parallel-finished: true
fail-on-error: false