Skip to content

Commit

Permalink
Migrate from Travis to GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Estes <estesp@amazon.com>
  • Loading branch information
estesp committed Apr 26, 2021
1 parent 16b287b commit a41b57e
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,85 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

checks:
name: Project Checks
runs-on: ubuntu-18.04
timeout-minutes: 5

steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16.x

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
with:
path: src/github.com/containerd/go-runc
fetch-depth: 25

- uses: containerd/project-checks@v1
with:
working-directory: src/github.com/containerd/go-runc

linters:
name: Linters
runs-on: ${{ matrix.os }}
timeout-minutes: 10

strategy:
matrix:
go-version: [1.16.x]
os: [ubuntu-18.04]

steps:
- uses: actions/checkout@v2
with:
path: src/github.com/containerd/go-runc

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: golangci/golangci-lint-action@v2
with:
version: v1.29
working-directory: src/github.com/containerd/go-runc

tests:
name: Tests
runs-on: ubuntu-18.04
timeout-minutes: 5

steps:
- uses: actions/checkout@v2
with:
path: src/github.com/containerd/go-runc

- uses: actions/setup-go@v2
with:
go-version: 1.16.x

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- run: |
go test -v -race -covermode=atomic -coverprofile=coverage.txt ./...
bash <(curl -s https://codecov.io/bash)
working-directory: src/github.com/containerd/go-runc
22 changes: 22 additions & 0 deletions .golangci.yml
@@ -0,0 +1,22 @@
linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
- goimports
- golint
- ineffassign
- vet
- unused
- misspell
disable:
- errcheck

issues:
include:
- EXC0002

run:
timeout: 2m

0 comments on commit a41b57e

Please sign in to comment.