fix: simulation tests #24
Workflow file for this run
This file contains 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: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
# Use --check or --exit-code when available (Go 1.19?) | |
# https://github.com/golang/go/issues/27005 | |
tidy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.0 | |
- run: | | |
go mod tidy | |
CHANGES_IN_REPO=$(git status --porcelain) | |
if [[ -n "$CHANGES_IN_REPO" ]]; then | |
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:" | |
git status && git --no-pager diff | |
exit 1 | |
fi | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.0 | |
- run: go build ./... | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.0 | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Test | |
run: go test ./... |