Skip to content

Commit

Permalink
Replace Travis by Github Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Rabot <[email protected]>
  • Loading branch information
sylr committed Dec 12, 2020
1 parent eeeca48 commit ae4dc15
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 17 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: Go
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go:
- "1.5"
- "1.6"
- "1.7"
- "1.8"
- "1.9"
- "1.10"
- "1.11"
- "1.12"
- "1.13"
- "1.14"
- "1.15"
- "tip"
env:
GOPATH: ${{ github.workspace }}/go
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/go/src/gopkg.in/yaml.v3
- name: Set up Go ${{ matrix.go }}
if: matrix.go != 'tip'
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Set up Go ${{ matrix.go }}
if: matrix.go == 'tip'
run: |
export GOROOT_BOOTSTRAP=`go env GOROOT`
export GOROOT=$HOME/gotip
mkdir $HOME/gotip
cd $HOME/gotip
curl -s 'https://go.googlesource.com/go/+/refs/heads/master?format=JSON' | awk '/"commit"/{print substr($2,2,40);exit}' >HEAD
awk '{printf("gotip-%s",substr($0,0,7))}' <HEAD >VERSION
curl -s -o go.tar.gz https://go.googlesource.com/go/+archive/`cat HEAD`.tar.gz
tar xfz go.tar.gz
cd src
bash make.bash
echo "GOROOT=$GOROOT" >> $GITHUB_ENV
echo "$GOROOT/bin" >> $GITHUB_PATH
- run: go version
- run: go get -t ./...
working-directory: ${{ github.workspace }}/go/src/gopkg.in/yaml.v3
- run: go test .
working-directory: ${{ github.workspace }}/go/src/gopkg.in/yaml.v3
16 changes: 16 additions & 0 deletions .github/workflows/semgrep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Semgrep
on: [push, pull_request]
jobs:
semgrep:
name: semgrep
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Semgrep
id: semgrep
uses: returntocorp/semgrep-action@v1
with:
config: p/dgryski.semgrep-go
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

0 comments on commit ae4dc15

Please sign in to comment.