Update deps, fix lint, fix mount example (#191) #384
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-examples | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
env: | |
GO111MODULE: "on" | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.20.x ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go stable | |
if: matrix.go-version != 'tip' | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install Go tip | |
if: matrix.go-version == '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 "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Go cache | |
uses: actions/cache@v2 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
key: ${{ runner.os }}-go-cache-ex-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-cache | |
- name: Test Examples | |
run: cd _examples && go test -race ./... |