Update github action to use gomodule (#39)

This commit is contained in:
Dong-hee Na 2019-12-07 10:50:05 +09:00 committed by GitHub
parent cd85f5fb0f
commit daf77da1c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 10 deletions

View File

@ -4,7 +4,7 @@ jobs:
test: test:
strategy: strategy:
matrix: matrix:
go-version: [1.6.x, 1.7.x, 1.8.x, 1.9.x, 1.10.x, 1.11.x, 1.12.x, 1.13.x] go-version: [1.6.x, 1.7.x, 1.8.x, 1.9.x, 1.10.x]
platform: [ubuntu-latest] platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
steps: steps:
@ -25,12 +25,5 @@ jobs:
- name: Install - name: Install
run: go get -t -v ./... run: go get -t -v ./...
- name: Test and coverage - name: Test
run: go test -coverprofile=coverage.txt -covermode=atomic run: go test ./...
- name: Upload codecoverage to CodeCov
uses: codecov/codecov-action@v1.0.4
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
flags: unittests

21
.github/workflows/ci_gomodule.yml vendored Normal file
View File

@ -0,0 +1,21 @@
on: [pull_request]
name: goimagehash workflow
jobs:
test:
strategy:
matrix:
go-version: [1.11.x, 1.12.x, 1.13.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v1
with:
path: src/github.com/corona10/goimagehash
- name: Test
run: go test ./...