refactor: propose id #385
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: CI | |
on: | |
schedule: | |
- cron: "00 19 * * *" # run ci periodically at 3 am | |
pull_request: | |
branches: [main] | |
env: | |
GO_VERSION: 1.21 | |
jobs: | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
- name: Format code | |
uses: iamnotaturtle/auto-gofmt@v2.1.0 | |
with: | |
# This part is also where you can pass other options, for example: | |
only_changed: True | |
lint: | |
name: Lint Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54.2 | |
working-directory: ./client/ | |
test: | |
name: Test Sample Validation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{env.GO_VERSION}} | |
- name: Start the cluster | |
run: ./scripts/quick_start.sh | |
- name: Run tests | |
run: GOLANG_PROTOBUF_REGISTRATION_CONFLICT="ignore" | |
go test | |
-coverpkg=./client | |
-coverprofile=coverage.out | |
-covermode=atomic | |
-v | |
./tests/ | |
env: | |
GO111MODULE: 'auto' | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
commit: | |
name: Commit Message Validation | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'schedule' }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- run: git show-ref | |
- uses: Swatinem/rust-cache@v2 | |
- uses: actions-rs/install@v0.1 | |
with: | |
crate: git-cz | |
version: latest | |
- name: Validate commit messages | |
run: git-cz check ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | |
spell-check: | |
name: Spell Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Actions Repository | |
uses: actions/checkout@v2 | |
- name: Check Spelling | |
uses: crate-ci/typos@master |