Skip to content

Merge pull request #55 from fxamacker/dependabot/github_actions/githu… #116

Merge pull request #55 from fxamacker/dependabot/github_actions/githu…

Merge pull request #55 from fxamacker/dependabot/github_actions/githu… #116

Workflow file for this run

# CI to build and test.
# Based on https://github.com/x448/float16/blob/master/.github/workflows/ci.yml
name: CI
# Revoke default permissions.
permissions: {}
on:
workflow_dispatch:
pull_request:
branches: [ main ]
push:
branches: [ main ]
tags:
- 'v*'
jobs:
# Test on various OS with some Go versions.
tests:
name: test ${{matrix.os}} go-${{ matrix.go-version }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
go-version: [1.17, '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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
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 30m -race -v ./...