mirror of
https://github.com/FiloSottile/age.git
synced 2026-01-05 03:43:57 +00:00
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Go tests
|
|
on: [push, pull_request]
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go: [1.19.x, 1.x]
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Install Go ${{ matrix.go }}
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Run tests
|
|
run: go test -race ./...
|
|
gotip:
|
|
name: Test (Go tip)
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Install bootstrap Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.22
|
|
- name: Install Go tip (UNIX)
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
git clone --filter=tree:0 https://go.googlesource.com/go $HOME/gotip
|
|
cd $HOME/gotip/src && ./make.bash
|
|
echo "$HOME/gotip/bin" >> $GITHUB_PATH
|
|
- name: Install Go tip (Windows)
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
git clone --filter=tree:0 https://go.googlesource.com/go $HOME/gotip
|
|
cd $HOME/gotip/src && ./make.bat
|
|
echo "$HOME/gotip/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- run: go version
|
|
- name: Run tests
|
|
run: go test -race ./...
|