You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.6 KiB
YAML
68 lines
1.6 KiB
YAML
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:
|
|
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
|