Browse Source

Merge pull request #1469 from manuelbuil/gh_actions

Add tests for PRs
Manuel Buil 3 years ago
parent
commit
c300c1a3c7
3 changed files with 20 additions and 2 deletions
  1. 18 0
      .github/workflows/e2eTests.yaml
  2. 1 1
      Makefile
  3. 1 1
      header-check.sh

+ 18 - 0
.github/workflows/e2eTests.yaml

@@ -0,0 +1,18 @@
+name: e2e tests for flannel
+
+on: [push, pull_request]
+
+jobs:
+  e2e-test:
+    name: test
+    runs-on: ubuntu-latest
+    steps:
+    - name: Set up Go 1.x
+      uses: actions/setup-go@v2
+      with:
+        go-version: ^1.15
+    - name: Check out code into the Go module directory
+      uses: actions/checkout@v2
+    - name: Run tests
+      run: git fetch --all --tags && make test
+

+ 1 - 1
Makefile

@@ -5,7 +5,7 @@ REGISTRY?=quay.io/coreos/flannel
 QEMU_VERSION=v3.0.0
 
 # Default tag and architecture. Can be overridden
-TAG?=$(shell git describe --tags --dirty)
+TAG?=$(shell git describe --tags --dirty --always)
 ARCH?=amd64
 # Only enable CGO (and build the UDP backend) on AMD64
 ifeq ($(ARCH),amd64)

+ 1 - 1
header-check.sh

@@ -6,4 +6,4 @@ licRes=$(for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do
 if [ -n "${licRes}" ]; then
 	echo -e "license header checking failed:\n${licRes}"
 	exit 255
-fi
+fi