ci cleanup
This commit is contained in:
parent
037e08a3a7
commit
3a65967b95
9 changed files with 17 additions and 44 deletions
7
.github/workflows/integration/Dockerfile
vendored
7
.github/workflows/integration/Dockerfile
vendored
|
@ -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"]
|
8
.github/workflows/integration/action.yml
vendored
8
.github/workflows/integration/action.yml
vendored
|
@ -1,8 +0,0 @@
|
|||
name: Check
|
||||
description: Run integration tests
|
||||
branding:
|
||||
icon: check-circle
|
||||
color: green
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
3
.github/workflows/integration/entrypoint.sh
vendored
3
.github/workflows/integration/entrypoint.sh
vendored
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
go test -cover ./pkg/runner
|
9
.github/workflows/lint/Dockerfile
vendored
9
.github/workflows/lint/Dockerfile
vendored
|
@ -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"]
|
8
.github/workflows/lint/action.yml
vendored
8
.github/workflows/lint/action.yml
vendored
|
@ -1,8 +0,0 @@
|
|||
name: Lint
|
||||
description: Run static analysis
|
||||
branding:
|
||||
icon: check-circle
|
||||
color: green
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
3
.github/workflows/lint/entrypoint.sh
vendored
3
.github/workflows/lint/entrypoint.sh
vendored
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
golangci-lint run
|
15
.github/workflows/push.yml
vendored
15
.github/workflows/push.yml
vendored
|
@ -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
|
||||
|
|
3
.github/workflows/tag.yml
vendored
3
.github/workflows/tag.yml
vendored
|
@ -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
|
||||
|
|
5
Makefile
5
Makefile
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue