Updated classroom model #392
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
| # This workflow will build a golang project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Go | |
| on: [push, pull_request] | |
| jobs: | |
| audit: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: [ '1.23.x' ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache-dependency-path: subdir/go.sum | |
| - name: Verify dependencies | |
| run: go mod verify | |
| - name: Cache Go modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install dependencies | |
| run: go get . | |
| - name: Build | |
| run: cd web && yarn && yarn run build && go build -v ./... && cd .. | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Install staticcheck | |
| run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
| - name: Run staticcheck | |
| run: staticcheck ./... | |
| - name: Test with Go | |
| run: go test -race -vet=off -json > TestResults-${{ matrix.go-version }}.json | |
| - name: Upload Go test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Go-results-${{ matrix.go-version }} | |
| path: TestResults-${{ matrix.go-version }}.json |