From 989e6e70bd5967f68414d60d05d85c2281e2d0e2 Mon Sep 17 00:00:00 2001 From: Armen Zambrano Gasparnian Date: Wed, 13 Jan 2021 13:32:09 -0500 Subject: [PATCH 1/3] ci: Run tests against tip of golang This builds the latest Go version by checking out the code and building it. The steps are based on https://github.com/actions/setup-go/issues/21#issuecomment-565704236. --- .github/workflows/ci.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bb2f0168..fc0ebb639 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,9 @@ name: go-workflow on: push: - branches: - - master + # XXX: Remove at the end + # branches: + # - master pull_request: jobs: golang-tests: @@ -11,7 +12,7 @@ jobs: timeout-minutes: 5 strategy: matrix: - go-version: ["1.15", "1.14", "1.13"] + go-version: ["tip", "1.15", "1.14", "1.13"] go111module: ["on", "off"] include: # includes goflags when go111module is on @@ -27,15 +28,25 @@ jobs: run: working-directory: ${{ github.workspace }}/src/github.com/getsentry/sentry-go steps: + - uses: actions/setup-go@v2 + if: matrix.go-version != 'tip' + with: + go-version: ${{ matrix.go-version}} + - name: Run setup-go for tip + if: matrix.go-version == 'tip' + working-directory: ${{ github.workspace }} + run: | + git clone https://go.googlesource.com/go $HOME/gotip + cd $HOME/gotip/src + ./make.bash + echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV + echo "PATH=$HOME/gotip/bin:$PATH" >> $GITHUB_ENV - uses: actions/checkout@v2 with: # Relative path under Github workspace path: ${{ github.workspace }}/src/github.com/getsentry/sentry-go # Getting all history enables using `git merge-base origin/master HEAD` fetch-depth: 0 - - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version}} - name: Adjustments for Module mode enabled if: matrix.go111module == 'on' run: | From ce6f515b438c51a0915454c95bb0b6d6a152414a Mon Sep 17 00:00:00 2001 From: Armen Zambrano Gasparnian Date: Thu, 14 Jan 2021 09:29:17 -0500 Subject: [PATCH 2/3] Add extra time --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc0ebb639..d83eb99ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: golang-tests: name: tests runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 10 strategy: matrix: go-version: ["tip", "1.15", "1.14", "1.13"] From cfe6804549a6d2e6bda9f658b6c1d9944a3b5a38 Mon Sep 17 00:00:00 2001 From: Armen Zambrano Gasparnian Date: Thu, 14 Jan 2021 09:37:11 -0500 Subject: [PATCH 3/3] Remove comment --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d83eb99ec..46103dc86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,8 @@ name: go-workflow on: push: - # XXX: Remove at the end - # branches: - # - master + branches: + - master pull_request: jobs: golang-tests: