Skip to content

Merge pull request #442 from onflow/dependabot/github_actions/github/… #809

Merge pull request #442 from onflow/dependabot/github_actions/github/…

Merge pull request #442 from onflow/dependabot/github_actions/github/… #809

Workflow file for this run

# GitHub Actions - CI for Go to build & test.
# Based on copy of https://github.com/fxamacker/cbor/workflows/ci.yml
name: ci
# Remove default permissions at top level and grant in jobs.
permissions: {}
on:
workflow_dispatch:
push:
branches:
- main
- 'feature/**'
- 'v**'
pull_request:
branches:
- main
- 'feature/**'
- 'v**'
jobs:
# Test on various OS with default Go version.
tests:
name: Test on ${{matrix.os}}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest]
go-version: ['1.20', 1.21, 1.22]
steps:
- name: Install Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build project
run: go build ./...
- name: Run tests
run: |
go version
go test -timeout 180m -race -v ./...