Github Actions on Mac, Windows, and Linux

Small example of setting up GitHub Actions to run on MacOS, Windows, and Linux with GitHub-hosted runners. In this case what a basic checkout, build, and test pass looks like in go.

# <repo>/.github/workflows/main.yml
name: CI

on: [push]

jobs:
  basic:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]

    steps:
    - uses: actions/checkout@v1
      with:
        path: ./src/neilpa.me/<package>
    - name: Build
      run: go build ./...
    - name: Test
      run: go test ./...