mirror of
https://github.com/creack/pty.git
synced 2026-04-01 02:57:06 +09:00
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
test:
|
|
name: "Test go ${{ matrix.go_version }} on ${{ matrix.platform }}"
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
go_version:
|
|
# Test the two currently supported releases (https://go.dev/doc/devel/release#policy)
|
|
- 1.17.x
|
|
- 1.18.x
|
|
include:
|
|
# Also sanity test a very old release on linux
|
|
- platform: ubuntu-latest
|
|
go_version: 1.6.x
|
|
|
|
steps:
|
|
# 1.6 doesn't seem to default GOPATH to anything, so we set it explicitly here
|
|
- name: Set GOPATH
|
|
run: echo "GOPATH=$HOME/go" >> $GITHUB_ENV
|
|
|
|
- name: Set up Go ${{ matrix.go_version }}
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ${{ matrix.go_version }}
|
|
check-latest: true
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build
|
|
run: go build -v
|
|
- name: Test
|
|
run: go test -v |