fix: awss3 client mock use customResolver #467
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: Test AWS | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "aws/**" | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
paths: | |
- "aws/**" | |
env: | |
testdir : ./aws | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [ 1.21.x ] | |
os: [ ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Cache Go modules | |
id: cache-go | |
uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Download Go modules | |
working-directory: ${{ env.testdir }} | |
shell: bash | |
if: ${{ steps.cache-go.outputs.cache-hit != 'true' }} | |
run: go mod download | |
- name: Setup Docker | |
uses: isbang/[email protected] | |
with: | |
compose-file: ${{ env.testdir }}/docker-compose.yaml | |
up-flags: --detach | |
- name: Test | |
working-directory: ${{ env.testdir }} | |
run: | | |
go install gotest.tools/gotestsum@latest | |
# shellcheck disable=SC2046 | |
gotestsum --junitfile unit-tests.xml -- -p 4 -parallel 4 -v ./... -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./... | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./unit-tests.xml,./coverage.txt |