Merge pull request #86 from btnguyen2k/dependabot/go_modules/github.c… #174
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: "godynamo" | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
testLocal: | |
name: Test against AWS DynamoDB local | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go env | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.13 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Start AWS DynamoDB local server | |
run: docker run -d --name dynamodb -p 8000:8000 amazon/dynamodb-local -jar DynamoDBLocal.jar -inMemory -sharedDb | |
- name: Test | |
run: | | |
export AWS_REGION="us-east-1" | |
export AWS_ACCESS_KEY_ID="DUMMYID" | |
export AWS_SECRET_ACCESS_KEY="DUMMYKEY" | |
export AWS_DYNAMODB_ENDPOINT="http://localhost:8000" | |
export AWS_DYNAMODB_URL="Endpoint=http://localhost:8000" | |
go test -v -timeout 9999s -count 1 -p 1 -cover -coverprofile coverage_local.txt . | |
- name: Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: local | |
name: local |