Skip to content

Merge pull request #415 from 88labs/fix/awss3-selectcsvheaders-ignore… #479

Merge pull request #415 from 88labs/fix/awss3-selectcsvheaders-ignore…

Merge pull request #415 from 88labs/fix/awss3-selectcsvheaders-ignore… #479

Workflow file for this run

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
working-directory: ${{ env.testdir }}
env:
DOCKER_BUILDKIT: 1
run: |
# Create the directory for the volume of dynamodb in advance, otherwise permission error will occur.
# https://stackoverflow.com/questions/45850688/unable-to-open-local-dynamodb-database-file-after-power-outage
mkdir -p ./docker/dynamodb/data
sudo chmod 777 ./docker/dynamodb/data
docker compose up -d
- 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