Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/fuzz-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,25 @@ jobs:
-fuzzminimizetime='${{ env.FUZZ_MINIMIZE_TIME }}'
${{ matrix.package }}
-
name: Upload failed corpus
name: Archive failed cases
if: ${{ failure() }}
run: |
tar czf fuzzcase.tgz $(find "${{ matrix.package }}/testdata/fuzz" -type f)
-
name: Upload failed cases
if: ${{ failure() }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
# TODO(fredbi): ideally, after uploading, we should fire a pull request to add
# this corpus to testdata.
with:
path: fuzzcase.tgz
name: '${{ runner.os }}-fuzz-corpus-failure'
retention-days: 60
-
name: Upload failed corpus
# This is the current corpus, it does not contain the latest failed case
if: ${{ failure() }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
path: ${{ env.CORPUS_DIR }}
name: '${{ runner.os }}-fuzz-corpus-failure'
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/go-test-monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ permissions:

on:
workflow_call:
inputs:
extra-flags:
description: extra flags to add to go test
type: string
required: false

defaults:
run:
Expand Down Expand Up @@ -115,6 +120,8 @@ jobs:
# This requires:
# * go.work properly initialized with use of all known modules
# * go.work committed to git
env:
EXTRA_FLAGS: ${{ inputs.extra-flags }}
run: >
gotestsum
--jsonfile 'unit.report.${{ matrix.os }}-${{ matrix.go }}.json'
Expand All @@ -126,13 +133,16 @@ jobs:
-timeout=20m
-coverprofile='unit.coverage.${{ matrix.os }}-${{ matrix.go }}.out'
-covermode=atomic
-coverpkg="$(go list)"/... ${EXTRA_FLAGS}
./...
-
name: Run unit tests on all modules (<go1.25 or no go.work) [monorepo]
if: >
${{
needs.lint.outputs.is-monorepo == 'true' && steps.detect-go-version.outputs.is-gotestwork-supported != 'true'
}}
env:
EXTRA_FLAGS: ${{ inputs.extra-flags }}
run: |
declare -a ALL_MODULES
ALL_MODULES=(${{ needs.lint.outputs.bash-subpaths }}) # a bash array with all module folders, suffixed with "/..."
Expand All @@ -147,10 +157,13 @@ jobs:
-timeout=20m \
-coverprofile='unit.coverage.${{ matrix.os }}-${{ matrix.go }}.out' \
-covermode=atomic \
-coverpkg="$(go list)"/... ${EXTRA_FLAGS} \
${ALL_MODULES[@]}
-
name: Run unit tests
if: ${{ needs.lint.outputs.is-monorepo != 'true' }}
env:
EXTRA_FLAGS: ${{ inputs.extra-flags }}
run: >
gotestsum
--jsonfile 'unit.report.${{ matrix.os }}-${{ matrix.go }}.json'
Expand All @@ -161,7 +174,7 @@ jobs:
-timeout=20m
-coverprofile='unit.coverage.${{ matrix.os }}-${{ matrix.go }}.out'
-covermode=atomic
-coverpkg="$(go list)"/...
-coverpkg="$(go list)"/... ${EXTRA_FLAGS}
./...
-
name: Upload coverage artifacts
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ permissions:

on:
workflow_call:
inputs:
extra-flags:
description: extra flags to add to go test
type: string
required: false

defaults:
run:
Expand Down Expand Up @@ -66,6 +71,8 @@ jobs:
echo "TMP=${TMP}" >> "${GITHUB_ENV}"
-
name: Run unit tests
env:
EXTRA_FLAGS: ${{ inputs.extra-flags }}
run: >
gotestsum
--jsonfile 'unit.report.${{ matrix.os }}-${{ matrix.go }}.json'
Expand All @@ -76,7 +83,7 @@ jobs:
-timeout=20m
-coverprofile='unit.coverage.${{ matrix.os }}-${{ matrix.go }}.out'
-covermode=atomic
-coverpkg="$(go list)"/...
-coverpkg="$(go list)"/... ${EXTRA_FLAGS}
./...
-
name: Upload coverage artifacts
Expand Down
Loading