Skip to content

Commit

Permalink
Run unit tests on Go tip from main branch
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Feb 5, 2023
1 parent 591d83f commit 3fc45f5
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci-unit-tests-go-tip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Unit Tests on Go Tip

on:
push:
branches: [main]

# See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
permissions: # added using https://github.com/step-security/secure-workflows
contents: read

jobs:
unit-tests-go-tip:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@18bf8ad2ca49c14cbb28b91346d626ccfb00c518
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

# From https://github.com/actions/setup-go/issues/21#issuecomment-997208686
- name: Install Go tip
run: |
curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz
ls -lah gotip.tar.gz
mkdir -p ~/sdk/gotip
tar -C ~/sdk/gotip -xzf gotip.tar.gz
~/sdk/gotip/bin/go version
echo "GOROOT=$HOME/sdk/gotip" >> $GITHUB_ENV
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
- name: Install tools
run: make install-ci

- name: Run unit tests
run: make test-ci

0 comments on commit 3fc45f5

Please sign in to comment.