Exec golangci-lint and go test #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: Go Lint & Test Sequence | |
run-name: Exec golangci-lint and go test | |
on: | |
push: | |
branches: | |
- main | |
- gh-action | |
jobs: | |
lint-and-test: | |
name: Lint and Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.21.5" | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v5 | |
with: | |
version: v1.57.2 | |
- name: Start Docker Compose | |
run: | | |
docker-compose -f platform/local/docker-compose-database.yml up -d | |
sleep 5 | |
- name: Set dummy AWS credentials | |
run: | | |
aws configure set aws_access_key_id dummy | |
aws configure set aws_secret_access_key dummy | |
aws configure set region ap-northeast-1 | |
- name: Run dynamodb local setup | |
run: | | |
./platform/local/scripts/dynamodb-local-setup.sh | |
- name: Run Tests | |
run: go test ./... |