refactor: NewConnector
signature (#7)
#24
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: | |
- "feat/**" | |
- "refactor/**" | |
- "fix/**" | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
workflow_call: | |
permissions: write-all | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goversion: ["1.23.0"] | |
services: | |
localstack: | |
image: localstack/localstack:latest | |
env: | |
SERVICES: dynamodb | |
ports: | |
- 4566:4566 | |
env: | |
AWS_ACCESS_KEY_ID: ABC1234567890 | |
AWS_SECRET_ACCESS_KEY: ABC1234567890 | |
AWS_REGION: ap-northeast-1 | |
DYNAMODB_ENDPOINT: http://127.0.0.1:4566 | |
steps: | |
- uses: Kesin11/actions-timeline@v2 | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.goversion }} | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Setup mockgen | |
run: | | |
go install go.uber.org/mock/mockgen@latest | |
- name: Go Generate | |
run: | | |
go mod tidy | |
go generate ./... | |
git diff --exit-code | |
- name: Setup reviewdog | |
uses: reviewdog/action-setup@v1 | |
with: | |
reviewdog_version: latest | |
- name: Setup staticcheck | |
run: | | |
go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: staticcheck with reviewdog | |
env: | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
staticcheck ./... | reviewdog -f=staticcheck -reporter=github-pr-check -level warning | |
- name: Unit Test | |
run: | | |
go test -v -coverpkg='github.com/miyamo2/pqxd' -coverprofile=coverage.out | |
- name: Setup Table | |
working-directory: tests/integration | |
run: | | |
aws dynamodb create-table --cli-input-json file://testdata/table-def.json --endpoint-url ${{ env.DYNAMODB_ENDPOINT }} | |
- name: Integration Test | |
working-directory: tests/integration | |
run: | | |
go test -v -coverpkg='github.com/miyamo2/pqxd' -coverprofile=coverage.out |