diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..36c52e5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + env: + GOFLAGS: -mod=readonly + GOPROXY: https://proxy.golang.org + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Unshallow + run: git fetch --prune --unshallow + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + + - name: Test + run: go test ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8dbf006..d71717c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,9 @@ on: jobs: goreleaser: runs-on: ubuntu-latest + env: + GOFLAGS: -mod=readonly + GOPROXY: https://proxy.golang.org steps: - name: Checkout uses: actions/checkout@v2 @@ -16,7 +19,7 @@ jobs: run: git fetch --prune --unshallow - name: Set up Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: go-version: 1.16