Skip to content

Fix overwriting of default patches #209

Fix overwriting of default patches

Fix overwriting of default patches #209

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
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: 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: |
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: go get ./...
- name: Run all examples
run: |
go run ./_examples/csv_output
go run ./_examples/experiment
go run ./_examples/extinction
go run ./_examples/json_parameters
go run ./_examples/observer
go run ./_examples/patches
go run ./_examples/weather
comp_tests:
name: Run comparison 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: go get ./...
- name: Run all comparison tests
run: |
go run ./_tests/default