From e033ca27d2d011e59a53eeaa7b31e5eb4ff54e4e Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Mon, 22 Jun 2020 09:59:02 +0200 Subject: [PATCH] Run windows build/test only on master The regular CI will only run on pull requests --- .github/workflows/ci.yml | 33 ------------ .github/workflows/master-ci.yml | 93 +++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/master-ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82679d4c3..47e16aa3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,36 +55,3 @@ jobs: - name: E2E Test run: make e2e-local - - windows-build: - name: Windows Build - runs-on: windows-latest - env: - GO111MODULE: "on" - steps: - - name: Set up Go 1.14 - uses: actions/setup-go@v1 - with: - go-version: 1.14 - id: go - - - name: Checkout code into the Go module directory - uses: actions/checkout@v2 - - - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: go-${{ hashFiles('**/go.sum') }} - - - name: Test - env: - BUILD_TAGS: example,local - run: make -f builder.Makefile test - - - name: Build - env: - BUILD_TAGS: example,local - run: make -f builder.Makefile cli - - - name: E2E Test - run: make e2e-win-ci diff --git a/.github/workflows/master-ci.yml b/.github/workflows/master-ci.yml new file mode 100644 index 000000000..18c7cc0a8 --- /dev/null +++ b/.github/workflows/master-ci.yml @@ -0,0 +1,93 @@ +name: Continuous integration + +on: + push: + branches: + - master + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + env: + GO111MODULE: "on" + steps: + - name: Set up Go 1.14 + uses: actions/setup-go@v1 + with: + go-version: 1.14 + id: go + + - name: Checkout code into the Go module directory + uses: actions/checkout@v2 + + - name: Run golangci-lint + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b . v1.27.0 + ./golangci-lint run --timeout 10m0s + + build: + name: Build + runs-on: ubuntu-latest + env: + GO111MODULE: "on" + steps: + - name: Set up Go 1.14 + uses: actions/setup-go@v1 + with: + go-version: 1.14 + id: go + + - name: Checkout code into the Go module directory + uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: go-${{ hashFiles('**/go.sum') }} + + - name: Test + env: + BUILD_TAGS: example,local + run: make -f builder.Makefile test + + - name: Build + env: + BUILD_TAGS: example,local + run: make -f builder.Makefile cli + + - name: E2E Test + run: make e2e-local + + windows-build: + name: Windows Build + runs-on: windows-latest + env: + GO111MODULE: "on" + steps: + - name: Set up Go 1.14 + uses: actions/setup-go@v1 + with: + go-version: 1.14 + id: go + + - name: Checkout code into the Go module directory + uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: go-${{ hashFiles('**/go.sum') }} + + - name: Test + env: + BUILD_TAGS: example,local + run: make -f builder.Makefile test + + - name: Build + env: + BUILD_TAGS: example,local + run: make -f builder.Makefile cli + + - name: E2E Test + run: make e2e-win-ci