Add funding model for BattlesnakeOfficial #277
This file contains hidden or 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 | |
| on: [push, pull_request] | |
| jobs: | |
| format: | |
| name: Format (gofmt) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-go@master | |
| with: | |
| go-version: '1.17' | |
| - name: gofmt | |
| run: test -z $(gofmt -l .) || (gofmt -d . && exit 1) | |
| lint: | |
| name: Lint (golangci-lint) | |
| runs-on: ubuntu-latest | |
| needs: [format] | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-go@master | |
| with: | |
| go-version: '1.17' | |
| - name: golangci-lint | |
| run: | | |
| curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.35.2 | |
| CGO_ENABLED=0 golangci-lint run -v ./... | |
| test: | |
| name: Tests (go test) | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-go@master | |
| with: | |
| go-version: '1.17' | |
| - name: Install inkscape | |
| run: | | |
| sudo add-apt-repository ppa:inkscape.dev/stable | |
| sudo apt update | |
| sudo apt install -y inkscape | |
| - name: go test | |
| run: go test -timeout 20s -race ./... | |
| build: | |
| name: Build (Docker) | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Run Docker Build | |
| run: docker build -t battlesnakeofficial/exporter . |