ci cleanup

This commit is contained in:
Casey Lee 2020-02-24 14:43:03 -08:00
parent 037e08a3a7
commit 3a65967b95
No known key found for this signature in database
GPG key ID: 1899120ECD0A1784
9 changed files with 17 additions and 44 deletions

View file

@ -1,7 +0,0 @@
FROM golangci/golangci-lint:v1.23.6
COPY "entrypoint.sh" "/entrypoint.sh"
RUN chmod +x /entrypoint.sh
ENV GOFLAGS -mod=vendor
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -1,8 +0,0 @@
name: Check
description: Run integration tests
branding:
icon: check-circle
color: green
runs:
using: 'docker'
image: 'Dockerfile'

View file

@ -1,3 +0,0 @@
#!/bin/sh
set -e
go test -cover ./pkg/runner

View file

@ -1,9 +0,0 @@
FROM golangci/golangci-lint:v1.23.6
RUN apt-get install git
COPY "entrypoint.sh" "/entrypoint.sh"
RUN chmod +x /entrypoint.sh
ENV GOFLAGS -mod=vendor
ENTRYPOINT ["/entrypoint.sh"]

View file

@ -1,8 +0,0 @@
name: Lint
description: Run static analysis
branding:
icon: check-circle
color: green
runs:
using: 'docker'
image: 'Dockerfile'

View file

@ -1,3 +0,0 @@
#!/bin/sh
set -e
golangci-lint run

View file

@ -2,14 +2,25 @@ name: push
on: push
jobs:
ci:
lint:
runs-on: ubuntu-latest
steps:
- run: echo ${{github.ref}}
- uses: actions/checkout@v2
- uses: docker://golangci/golangci-lint:v1.23.6
with:
args: golangci-lint run
env:
CGO_ENABLED: 0
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/workflows/lint
- uses: actions/setup-go@v1
with:
go-version: 1.13
- run: go test -cover ./...
env:
CGO_ENABLED: 0
GOFLAGS: -mod=vendor

View file

@ -6,10 +6,11 @@ on:
jobs:
release:
if: startsWith(github.ref, "v")
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run GoReleaser
- name: GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest

View file

@ -12,12 +12,11 @@ endif
IS_SNAPSHOT = $(if $(findstring -, $(VERSION)),true,false)
TAG_VERSION = v$(VERSION)
ACT ?= go run -mod=vendor main.go
ACT ?= go run main.go
export GITHUB_TOKEN = $(shell cat ~/.config/github/token)
check:
@golangci-lint run
@go test -cover ./...
$(ACT) -P ubuntu-latest=nektos/act-environments-ubuntu:18.04
build: check
$(eval export SNAPSHOT_VERSION=$(VERSION))