diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..bd5850dc4a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + schedule: + - cron: '0 5 * * *' + pull_request: + paths-ignore: + - 'docs/**' + - 'charts/**' + - 'scripts/**' + - '*.md' + +env: + GOARCH: amd64 + CGO_ENABLED: 0 + SETUP_GO_VERSION: '^1.18' + +jobs: + unit-test: + runs-on: ubuntu-latest + + steps: + - + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - + uses: actions/setup-go@v2 + with: + go-version: ${{ env.SETUP_GO_VERSION }} + - + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - + name: unit-test + run: go test -shuffle=on $(go list ./... | grep -v /e2e) diff --git a/scripts/ci b/scripts/ci index 523341057a..49720bf265 100755 --- a/scripts/ci +++ b/scripts/ci @@ -4,7 +4,6 @@ set -e cd $(dirname $0) ./build -./test ./validate ./validate-ci ./package diff --git a/scripts/default b/scripts/default index af2ad2db15..05fb0a6035 100755 --- a/scripts/default +++ b/scripts/default @@ -4,5 +4,4 @@ set -e cd $(dirname $0) ./build -./test ./package diff --git a/scripts/test b/scripts/test deleted file mode 100755 index 9773c60cc0..0000000000 --- a/scripts/test +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e - -cd $(dirname $0)/.. - -echo Running tests -go test -cover -tags=test $(go list ./... | grep -v /e2e)