Skip to content

Commit 7de28ce

Browse files
authored
Add GHA workflow to run test_crosscompile and go test (#141)
* Add GHA workflow to run test_crosscompile and go test * crosscompile job doesn't need setup-go * Test more go versions * Test 1.6 * Remove 1.13 and add comment of testing strategy
1 parent edfd13d commit 7de28ce

37 files changed

+95
-39
lines changed

.github/workflows/crosscompile.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Crosscompile
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
name: Run ./test_crosscompile.sh
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v2
16+
- name: Run ./test_crosscompile.sh
17+
run: ./test_crosscompile.sh

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
name: "Test go ${{ matrix.go_version }} on ${{ matrix.platform }}"
14+
runs-on: ${{ matrix.platform }}
15+
16+
strategy:
17+
matrix:
18+
platform:
19+
- ubuntu-latest
20+
- macos-latest
21+
go_version:
22+
# Test the oldest release we targeted and the two currently supported releases (https://go.dev/doc/devel/release#policy)
23+
- 1.6.x
24+
- 1.17.x
25+
- 1.18.x
26+
27+
steps:
28+
- name: Set up Go ${{ matrix.go_version }}
29+
uses: actions/setup-go@v2
30+
with:
31+
go-version: ${{ matrix.go_version }}
32+
check-latest: true
33+
- name: Checkout repo
34+
uses: actions/checkout@v2
35+
36+
- name: Build
37+
run: go build -v
38+
- name: Test
39+
run: go test -v

ioctl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//go:build !windows && !solaris
2-
//+build !windows,!solaris
2+
// +build !windows,!solaris
33

44
package pty
55

ioctl_bsd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build (darwin || dragonfly || freebsd || netbsd || openbsd)
2-
//+build darwin dragonfly freebsd netbsd openbsd
1+
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
2+
// +build darwin dragonfly freebsd netbsd openbsd
33

44
package pty
55

ioctl_solaris.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//go:build solaris
2-
//+build solaris
2+
// +build solaris
33

44
package pty
55

pty_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//go:build darwin
2-
//+build darwin
2+
// +build darwin
33

44
package pty
55

pty_dragonfly.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//go:build dragonfly
2-
//+build dragonfly
2+
// +build dragonfly
33

44
package pty
55

pty_freebsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//go:build freebsd
2-
//+build freebsd
2+
// +build freebsd
33

44
package pty
55

pty_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//go:build linux
2-
//+build linux
2+
// +build linux
33

44
package pty
55

pty_netbsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//go:build netbsd
2-
//+build netbsd
2+
// +build netbsd
33

44
package pty
55

0 commit comments

Comments
 (0)