on: push: branches: - master pull_request: branches: - master name: Test jobs: test: strategy: matrix: go-version: [1.17.x] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - name: Install Go uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v2 - name: Test run: | go version go test ./... - name: Test with -race # macos and windows tend to be a bit slower, # and it's rare that a race in garble would be OS-specific. if: matrix.os == 'ubuntu-latest' run: | go test -race ./... test-gotip: if: ${{ false }} # this fails on tip: go clean -cache && go test -run Script/goprivate runs-on: ubuntu-latest continue-on-error: true # master may not be as stable steps: - name: Install Go env: GO_COMMIT: 578ada410de8065dbca46bca08a5993d1307f423 # 2021-11-09 run: | cd $HOME mkdir $HOME/gotip cd $HOME/gotip wget -O gotip.tar.gz https://go.googlesource.com/go/+archive/${GO_COMMIT}.tar.gz tar -xf gotip.tar.gz echo "devel go1.18-${GO_COMMIT}" >VERSION cd src ./make.bash echo "GOROOT=$HOME/gotip" >>$GITHUB_ENV echo "$HOME/gotip/bin" >>$GITHUB_PATH - name: Checkout code uses: actions/checkout@v2 - name: Test run: | go version go test ./... code-checks: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Test that only LF line endings are used run: ./scripts/crlf-test.sh