Skip to content

Commit 015be45

Browse files
committed
Move CI tests to GitHub Action
1 parent 100c9a6 commit 015be45

File tree

3 files changed

+40
-33
lines changed

3 files changed

+40
-33
lines changed

.github/workflows/test.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
on:
2+
push:
3+
branches: [ main ]
4+
pull_request:
5+
name: Test
6+
jobs:
7+
test:
8+
strategy:
9+
matrix:
10+
go-version: [1.16.x,1.17.x,1.18.x]
11+
# TODO(bep) fix windows-latest
12+
platform: [ubuntu-latest, macos-latest]
13+
runs-on: ${{ matrix.platform }}
14+
steps:
15+
- name: Install Go
16+
uses: actions/setup-go@v3
17+
with:
18+
go-version: ${{ matrix.go-version }}
19+
- name: Install staticcheck
20+
if: matrix.go-version != '1.16.x'
21+
run: go install honnef.co/go/tools/cmd/staticcheck@latest
22+
shell: bash
23+
- name: Update PATH
24+
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
25+
shell: bash
26+
- name: Checkout code
27+
uses: actions/checkout@v1
28+
#- name: Fmt
29+
# if: matrix.platform != 'windows-latest' # :(
30+
# run: "diff <(gofmt -d .) <(printf '')"
31+
# shell: bash
32+
- name: Vet
33+
run: go vet ./...
34+
#- name: Staticcheck
35+
# if: matrix.go-version != '1.16.x'
36+
# run: staticcheck ./...
37+
- name: Test
38+
run: go test -race ./...

.travis.yml

-26
This file was deleted.

appveyor.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This currently does nothing. We have moved to GitHub action, but this is kept
2+
# until spf13 has disabled this project in AppVeyor.
13
version: '{build}'
24
clone_folder: C:\gopath\src\github.com\spf13\afero
35
environment:
@@ -6,10 +8,3 @@ build_script:
68
- cmd: >-
79
go version
810
9-
go env
10-
11-
go get -v github.com/spf13/afero/...
12-
13-
go build -v github.com/spf13/afero/...
14-
test_script:
15-
- cmd: go test -count=1 -cover -race -v github.com/spf13/afero/...

0 commit comments

Comments
 (0)