tasks: notify at start and due times based on priority (#58) #38
This file contains hidden or 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: Go CI | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| paths: | |
| - "core/**" | |
| - ".github/workflows/go-ci.yml" | |
| pull_request: | |
| branches: [master, main] | |
| paths: | |
| - "core/**" | |
| - ".github/workflows/go-ci.yml" | |
| concurrency: | |
| group: go-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CGO_ENABLED: "0" | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: core | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: ./core/go.mod | |
| - name: Format check | |
| run: | | |
| if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then | |
| echo "The following files are not formatted:" | |
| gofmt -s -l . | |
| exit 1 | |
| fi | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.11 | |
| working-directory: core | |
| test: | |
| name: Test | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| working-directory: core | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: ./core/go.mod | |
| - name: Run tests | |
| run: go test -v ./... | |
| # The race detector is the one place cgo is required; release builds stay CGO-free. | |
| - name: Run tests with race detector | |
| run: go test -race ./... | |
| env: | |
| CGO_ENABLED: "1" | |
| - name: Generate coverage report | |
| run: go test -coverprofile=coverage.out ./... | |
| - name: Display coverage | |
| run: go tool cover -func=coverage.out | |
| build: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: ./core/go.mod | |
| - name: Build | |
| run: make build |