mirror of
https://github.com/esimov/forensic.git
synced 2025-09-26 20:41:40 +08:00
ci: replaced travis with Github action
This commit is contained in:
44
.github/workflows/build.yml
vendored
Normal file
44
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
go-version: [~1.13, ~1.14, ~1.15, ~1.16, ~1.17]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
GO111MODULE: "on"
|
||||
steps:
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Cache-Go
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod # Module download cache
|
||||
~/.cache/go-build # Build cache (Linux)
|
||||
~/Library/Caches/go-build # Build cache (Mac)
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Download Go modules
|
||||
run: go mod download
|
||||
|
||||
- name: Install project
|
||||
run: go install
|
23
.travis.yml
23
.travis.yml
@@ -1,23 +0,0 @@
|
||||
language: go
|
||||
|
||||
branches:
|
||||
only:
|
||||
- "master"
|
||||
|
||||
# In theory, older versions would probably work just fine
|
||||
go:
|
||||
- 1.8
|
||||
- 1.9
|
||||
|
||||
env:
|
||||
- GOOS=linux
|
||||
- GOOS=darwin
|
||||
- GOOS=windows
|
||||
|
||||
script:
|
||||
- go get -u -t ./...
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: never
|
Reference in New Issue
Block a user