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
|
on: push
|
||||||
|
|
||||||
jobs:
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/workflows/lint
|
|
||||||
- uses: actions/setup-go@v1
|
- uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.13
|
go-version: 1.13
|
||||||
- run: go test -cover ./...
|
- run: go test -cover ./...
|
||||||
env:
|
env:
|
||||||
CGO_ENABLED: 0
|
CGO_ENABLED: 0
|
||||||
|
GOFLAGS: -mod=vendor
|
||||||
|
|
3
.github/workflows/tag.yml
vendored
3
.github/workflows/tag.yml
vendored
|
@ -6,10 +6,11 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
if: startsWith(github.ref, "v")
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Run GoReleaser
|
- name: GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v1
|
uses: goreleaser/goreleaser-action@v1
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -12,12 +12,11 @@ endif
|
||||||
IS_SNAPSHOT = $(if $(findstring -, $(VERSION)),true,false)
|
IS_SNAPSHOT = $(if $(findstring -, $(VERSION)),true,false)
|
||||||
TAG_VERSION = v$(VERSION)
|
TAG_VERSION = v$(VERSION)
|
||||||
|
|
||||||
ACT ?= go run -mod=vendor main.go
|
ACT ?= go run main.go
|
||||||
export GITHUB_TOKEN = $(shell cat ~/.config/github/token)
|
export GITHUB_TOKEN = $(shell cat ~/.config/github/token)
|
||||||
|
|
||||||
check:
|
check:
|
||||||
@golangci-lint run
|
$(ACT) -P ubuntu-latest=nektos/act-environments-ubuntu:18.04
|
||||||
@go test -cover ./...
|
|
||||||
|
|
||||||
build: check
|
build: check
|
||||||
$(eval export SNAPSHOT_VERSION=$(VERSION))
|
$(eval export SNAPSHOT_VERSION=$(VERSION))
|
||||||
|
|
Loading…
Reference in a new issue