Skip to content

Upgrade to beecs v0.3.0 (#56) #149

Upgrade to beecs v0.3.0 (#56)

Upgrade to beecs v0.3.0 (#56) #149

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libgl1-mesa-dev xorg-dev
go get ./...
- name: Build executable
run: |
go build -o test/main .
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22.x'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libgl1-mesa-dev xorg-dev
go get ./...
- name: Run Unit tests
run: |
go test -v -covermode atomic -coverprofile="coverage.out" ./...
go tool cover -func="coverage.out"
lint:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22.x'
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libgl1-mesa-dev xorg-dev
go get ./...
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/gordonklaus/ineffassign@latest
- name: Check format
run: |
if gofmt -e -l . >&1 | grep '^'; then
exit 1
fi
- name: Lint with vet
run: go vet ./...
#- name: Lint with staticcheck
# run: staticcheck ./...
- name: Lint with ineffassign
run: ineffassign ./...
examples:
name: Run examples
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22.x'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libgl1-mesa-dev xorg-dev xvfb
go get ./...
- name: Run examples 1
run: |
xvfb-run --auto-servernum --server-num=1 go run . --tps 120 -d _examples/base -x params.Termination.MaxTicks=365
go run . -r 5 -d _examples/base -e -x params.Termination.MaxTicks=365
xvfb-run --auto-servernum --server-num=1 go run . --tps 120 -d _examples/patches -o -x params.Termination.MaxTicks=365
xvfb-run --auto-servernum --server-num=1 go run . --tps 120 -d _examples/weather_file -o -x params.Termination.MaxTicks=730
xvfb-run --auto-servernum --server-num=1 go run . --tps 120 -d _examples/weather_builtin -o -x params.Termination.MaxTicks=730
xvfb-run --auto-servernum --server-num=1 go run . --tps 120 -d _examples/systems -o -s -x params.Termination.MaxTicks=730
go run . -d _examples/systems -o -s -e -r 10