Migrate from Travis/Appveyor combo to GitHub actions (#104)
* Add a github actions workflow config (linux + windows build) * Remove Travis config, migrated to Github Actions * Remove AppVeyor configs, migrated to Github Actions
This commit is contained in:

committed by
GitHub

parent
0ce3a07f8e
commit
d3bdbe53c8
34
.github/workflows/build-and-test.yaml
vendored
Normal file
34
.github/workflows/build-and-test.yaml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: build-and-test
|
||||
on: [pull_request, push]
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
- run: sudo apt-get install libusb-1.0-0-dev
|
||||
- run: go install golang.org/x/tools/cmd/cover@latest
|
||||
- run: go install golang.org/x/lint/golint@latest
|
||||
- run: $HOME/go/bin/golint ./...
|
||||
- run: sh ./.github/test-coverage.sh
|
||||
- uses: shogo82148/actions-goveralls@v1
|
||||
with:
|
||||
path-to-profile: coverage.merged
|
||||
ignore: libusb.go,error.go
|
||||
windows:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.17
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
install: |-
|
||||
mingw64/mingw-w64-x86_64-libusb
|
||||
mingw64/mingw-w64-x86_64-pkg-config
|
||||
- run: echo "D:\a\_temp\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
- run: go test ./...
|
||||
- run: go run ./lsusb
|
Reference in New Issue
Block a user