Skip to content

Switch to go1.26 crypto/hpke (#63) #195

Switch to go1.26 crypto/hpke (#63)

Switch to go1.26 crypto/hpke (#63) #195

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
build-and-run-tests:
name: Build & run tests
if: github.ref_type == 'branch'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
# https://github.com/actions/checkout/tree/v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Get GO version
id: goversion
run: echo "goversion=$(<.goversion)" > "${GITHUB_OUTPUT}"
- name: Set up Go
# https://github.com/actions/setup-go/tree/v5.2.0
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a
with:
go-version: ${{steps.goversion.outputs.goversion}}
- name: Build
run: |
for d in $(find . -name go.mod); do
(cd $(dirname $d) && go build ./...)
done
- name: Run go vet
run: |
for d in $(find . -name go.mod); do
(cd $(dirname $d) && go vet ./...)
done
- name: Run go fmt
run: |
for d in $(find . -name go.mod); do
out="$(cd $(dirname $d) && go fmt ./...)"
if [[ -n "${out}" ]]; then
echo "Need to run `go fmt` on:"
echo "${out}"
exit 1
fi
done
- name: Run go tests
run: |
for d in $(find . -name go.mod); do
(cd $(dirname $d) && go test -failfast ./...)
done