build(deps): bump github.com/migueleliasweb/go-github-mock from 1.0.1 to 1.1.0 #536
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2022 - 2024 NRK | |
# | |
# SPDX-License-Identifier: MIT | |
name: Fuzz Test | |
on: | |
pull_request: | |
paths-ignore: | |
- '.github/' | |
branches: | |
- main | |
jobs: | |
FuzzTests: | |
strategy: | |
matrix: | |
tests: ["FuzzTokenAuth;./pkg/registry;60s", "FuzzRoutes;./pkg/registry;60s"] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
go-version-file: "go.mod" | |
- name: Fuzz test | |
shell: bash | |
env: | |
TEST: "${{ matrix.tests }}" | |
run: | | |
IFS=";" read test pkg timeout <<<$TEST | |
go test "${pkg}" -fuzztime="${timeout}" -fuzz="${test}" | |
- name: Upload fuzz failure seed corpus as run artifact | |
if: failure() | |
uses: actions/[email protected] | |
with: | |
name: testdata | |
path: pkg/registry/testdata | |
- name: Report failure | |
uses: actions/[email protected] | |
if: failure() && github.event_name == 'pull_request' | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Fuzz test failed on ${{ github.event.pull_request.head.sha }}. To troubleshoot locally, use the [GitHub CLI](https://cli.github.com) to download the seed corpus with\n```\ngh run download ${{ github.run_id }} -n testdata\n```' | |
}) |