Skip to content

doc: remove extraneous performance and version info from READMEs #5

doc: remove extraneous performance and version info from READMEs

doc: remove extraneous performance and version info from READMEs #5

Workflow file for this run

name: Go Build and Test
on:
push:
branches: [ main, develop ]
paths:
- 'go/**'
- '.github/workflows/go.yml'
pull_request:
branches: [ main, develop ]
paths:
- 'go/**'
- '.github/workflows/go.yml'
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.20', '1.21', '1.22']
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Cache Go modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('go/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Check code formatting
working-directory: go
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "Code formatting issues found:"
gofmt -s -l .
echo "Run 'go fmt ./...' to fix."
exit 1
fi
- name: Run go vet
working-directory: go
run: |
go vet ./...
- name: Download dependencies
working-directory: go
run: |
go mod download
- name: Build
working-directory: go
run: |
go build -v ./...
- name: Run tests
working-directory: go
run: |
go test -v ./...
- name: Build executable
working-directory: go
run: |
go build -o blackjack_trainer ./
- name: Test executable
working-directory: go
run: |
./blackjack_trainer --help