build test GitHub actions workflow to ensure main branch will always … #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Build | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
paths: | ||
- .github/workflows/build_test.yml | ||
- **.go | ||
- go.mod | ||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
runner: | ||
- ubuntu-22.04 | ||
- windows-2022 | ||
- macos-12 | ||
runs-on: ${{ matrix.runner }} | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
# Go is pre-installed in MacOS and Windows runners | ||
- name: Install Go | ||
if: ${{ matrix.runner == 'ubuntu-22.04' }} | ||
run: sudo apt install golang-go | ||
- name: Build binary | ||
run: go build |