name: CI on: # Pushes and pulls to all branches push: pull_request: # Run on the first day of every month schedule: - cron: "0 0 1 * *" # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: # Build and test everything build: runs-on: ubuntu-latest steps: # Checkout the code - name: Checkout Code uses: actions/checkout@v4 # Set up the GoLang environment - name: Set up Go uses: actions/setup-go@v5 with: go-version: 1.17 # Download all the tools used in the steps that follow - name: Set up Tools run: | go install github.com/fzipp/gocyclo/cmd/gocyclo@v0.6.0 go install github.com/mattn/goveralls@v0.0.12 # Run all the unit-tests - name: Test run: | make test # Run some tests to ensure no race conditions exist - name: Test for Race Conditions run: make test-race # Run the benchmarks to manually ensure no performance degradation - name: Benchmark run: make bench # Upload all the unit-test coverage reports to Coveralls - name: Upload Coverage Report env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: goveralls -service=github -coverprofile=.coverprofile