add number design doc #45
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
- run: make mod | |
- run: make build | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
- uses: golangci/golangci-lint-action@v5 | |
with: | |
version: latest | |
args: --timeout=10m | |
test-unit: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
- run: make test-unit | |
test-integration: | |
name: Integration Test | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
- run: make test-integration | |
dependabot-automerge: | |
name: Dependabot Automerge | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
needs: | |
- build | |
- lint | |
- test-unit | |
- test-integration | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
steps: | |
- name: Dependabot metadata | |
uses: dependabot/fetch-metadata@v2 | |
id: metadata | |
- uses: actions/checkout@v4 | |
- name: Enable automerge | |
if: | | |
steps.metadata.outputs.update-type == 'version-update:semver-patch' || | |
steps.metadata.outputs.update-type == 'version-update:semver-minor' | |
run: | | |
gh pr merge ${{ github.event.number }} --auto --merge | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |