Skip to content

Merge pull request #124 from x448/dependabot/github_actions/actions/s… #284

Merge pull request #124 from x448/dependabot/github_actions/actions/s…

Merge pull request #124 from x448/dependabot/github_actions/actions/s… #284

Workflow file for this run

# GitHub Actions - CI for Go with just builders and tests.
# https://github.com/x448/float16/blob/master/.github/workflows/ci.yml
# Use cover.yml for coverage and safer-golangci-lint.yml for linting.
name: ci
on:
workflow_dispatch:
pull_request:
push:
branches:
- 'master'
tags:
- 'v*'
# Revoke default permissions.
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
# Test on various OS and go versions.
tests:
name: test ${{matrix.os}} go-${{ matrix.go-version }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
go-version: [1.17, 1.23, 1.24] # oldest supported version and latest 2 versions
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build project
run: go build ./...
- name: Run tests
run: |
go version
go test -short -race -v ./...