Skip to content

Testing

Testing #1701

Workflow file for this run

name: Testing
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "5 1 * * *" # Run nightly
workflow_dispatch:
jobs:
gofmt:
name: go fmt (Go ${{ matrix.go }})
runs-on: ubuntu-24.04
strategy:
matrix:
go: [ '1.25', '1.26' ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Run go fmt
if: runner.os != 'Windows'
run: diff -u <(echo -n) <(gofmt -d -s .)
govet:
name: go vet (Go ${{ matrix.go }})
runs-on: ubuntu-24.04
strategy:
matrix:
go: [ '1.25', '1.26' ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Run go vet
run: make vet
staticcheck:
name: staticcheck (Go ${{ matrix.go }})
runs-on: ubuntu-24.04
strategy:
matrix:
go: [ '1.25', '1.26' ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Run staticcheck
uses: dominikh/staticcheck-action@v1.4.1
with:
version: "2026.1"
install-go: false
cache-key: staticcheck
unittesting:
name: unit testing (Go ${{ matrix.go }})
runs-on: ubuntu-24.04
strategy:
matrix:
go: [ '1.25', '1.26' ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
# Checkout the Fuzzing seed and generated corpus
# Classical unit tests execute the fuzzing tests as well,
# but mainly with the pre-existing corpus.
#
# Deactivated right now, because this let the unit tests
# run into an execution timeout.
#
#- uses: actions/checkout@v6
# with:
# repository: andygrunwald/vdf-fuzzing-corpus
# path: testdata/fuzz
- name: Run Unit tests.
run: make test