This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Update README.md to indicate project was moved #90
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
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
name: Test | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [1.20.x, 1.21.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' # caching pip dependencies | |
- name: Install cfsm_bisimulation | |
run: pip install -r requirements.txt | |
- name: Test | |
run: go test ./... -coverprofile=coverage.txt -covermode atomic -coverpkg=./cfsm/...,./internal/...,./contract -timeout 30s | |
- name: Print coverage info | |
run: go tool cover -func coverage.txt | |
- name: Test with race detector | |
run: go test -race ./... -timeout 1m -v | |
lint-and-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
args: --timeout=5m | |
- name: Run go vet | |
run: go vet ./... | |
- name: Run gofmt | |
run: go fmt ./... | |
- name: Install buf | |
uses: bufbuild/buf-setup-action@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: bufbuild/buf-lint-action@v1 | |
with: | |
input: proto | |
- uses: bufbuild/buf-breaking-action@v1 | |
with: | |
# The 'main' branch of the GitHub repository that defines the module. | |
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main,subdir=proto" | |
input: proto |