summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Lee <cplee@nektos.com>2020-02-24 23:43:03 +0100
committerCasey Lee <cplee@nektos.com>2020-02-24 23:43:03 +0100
commit3a65967b95a0de8188e00fc0f28253b6e0bdca67 (patch)
tree514ca2ac496b0c5410f74d619ac06f4899c8b7e6
parentintegration test (diff)
downloadforgejo-act-3a65967b95a0de8188e00fc0f28253b6e0bdca67.tar.xz
forgejo-act-3a65967b95a0de8188e00fc0f28253b6e0bdca67.zip
ci cleanup
-rw-r--r--.github/workflows/integration/Dockerfile7
-rw-r--r--.github/workflows/integration/action.yml8
-rw-r--r--.github/workflows/integration/entrypoint.sh3
-rw-r--r--.github/workflows/lint/Dockerfile9
-rw-r--r--.github/workflows/lint/action.yml8
-rw-r--r--.github/workflows/lint/entrypoint.sh3
-rw-r--r--.github/workflows/push.yml15
-rw-r--r--.github/workflows/tag.yml3
-rw-r--r--Makefile5
9 files changed, 17 insertions, 44 deletions
diff --git a/.github/workflows/integration/Dockerfile b/.github/workflows/integration/Dockerfile
deleted file mode 100644
index 9a5c108..0000000
--- a/.github/workflows/integration/Dockerfile
+++ /dev/null
@@ -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"]
diff --git a/.github/workflows/integration/action.yml b/.github/workflows/integration/action.yml
deleted file mode 100644
index 8c73f49..0000000
--- a/.github/workflows/integration/action.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-name: Check
-description: Run integration tests
-branding:
- icon: check-circle
- color: green
-runs:
- using: 'docker'
- image: 'Dockerfile'
diff --git a/.github/workflows/integration/entrypoint.sh b/.github/workflows/integration/entrypoint.sh
deleted file mode 100644
index 262d051..0000000
--- a/.github/workflows/integration/entrypoint.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-set -e
-go test -cover ./pkg/runner
diff --git a/.github/workflows/lint/Dockerfile b/.github/workflows/lint/Dockerfile
deleted file mode 100644
index 5c67ab2..0000000
--- a/.github/workflows/lint/Dockerfile
+++ /dev/null
@@ -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"]
diff --git a/.github/workflows/lint/action.yml b/.github/workflows/lint/action.yml
deleted file mode 100644
index 2f30087..0000000
--- a/.github/workflows/lint/action.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-name: Lint
-description: Run static analysis
-branding:
- icon: check-circle
- color: green
-runs:
- using: 'docker'
- image: 'Dockerfile'
diff --git a/.github/workflows/lint/entrypoint.sh b/.github/workflows/lint/entrypoint.sh
deleted file mode 100644
index 304b1b9..0000000
--- a/.github/workflows/lint/entrypoint.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-set -e
-golangci-lint run
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
index 0db5137..66c241a 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/push.yml
@@ -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
diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml
index 6c1f4ef..f258c22 100644
--- a/.github/workflows/tag.yml
+++ b/.github/workflows/tag.yml
@@ -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
diff --git a/Makefile b/Makefile
index c8fd328..d3e2387 100644
--- a/Makefile
+++ b/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))