Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CI tests to GitHub Action #367

Merged
merged 1 commit into from Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,38 @@
on:
push:
branches: [ main ]
pull_request:
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.16.x,1.17.x,1.18.x]
# TODO(bep) fix windows-latest
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install staticcheck
if: matrix.go-version != '1.16.x'
run: go install honnef.co/go/tools/cmd/staticcheck@latest
shell: bash
- name: Update PATH
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- name: Checkout code
uses: actions/checkout@v1
#- name: Fmt
# if: matrix.platform != 'windows-latest' # :(
# run: "diff <(gofmt -d .) <(printf '')"
# shell: bash
- name: Vet
run: go vet ./...
#- name: Staticcheck
# if: matrix.go-version != '1.16.x'
# run: staticcheck ./...
- name: Test
run: go test -race ./...
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

9 changes: 2 additions & 7 deletions appveyor.yml
@@ -1,3 +1,5 @@
# This currently does nothing. We have moved to GitHub action, but this is kept
# until spf13 has disabled this project in AppVeyor.
version: '{build}'
clone_folder: C:\gopath\src\github.com\spf13\afero
environment:
Expand All @@ -6,10 +8,3 @@ build_script:
- cmd: >-
go version

go env

go get -v github.com/spf13/afero/...

go build -v github.com/spf13/afero/...
test_script:
- cmd: go test -count=1 -cover -race -v github.com/spf13/afero/...