Skip to content

Commit

Permalink
Change to manually build Docker for aws ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtwinkle committed Jan 21, 2025
1 parent 005ff58 commit aea3a35
Showing 1 changed file with 53 additions and 3 deletions.
56 changes: 53 additions & 3 deletions .github/workflows/test-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,37 @@ jobs:
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
services:
minio:
image: minio/minio:latest
ports:
- 29000:9000
env:
MINIO_ROOT_USER: DUMMYACCESSKEYEXAMPLE
MINIO_ROOT_PASSWORD: DUMMYSECRETKEYEXAMPLE
AWS_DEFAULT_REGION: ap-northeast-1
AWS_EC2_METADATA_DISABLED: true
options: >-
--entrypoint sh
--command -c "minio server /data;"
--health-cmd "mc ready local"
--health-interval 5s
--health-timeout 5s
--health-retries 5
elasticmq:
image: softwaremill/elasticmq:latest
ports:
- 29324:29324
env:
JAVA_OPTS: "-Dconfig.override_with_env_vars=true"
CONFIG_FORCE_node-address_port: 29324
CONFIG_FORCE_rest-sqs_bind-port: 29324
CONFIG_FORCE_queues_test-queue_fifo: false
CONFIG_FORCE_queues_test-2-queue_fifo: false
dynamodb:
image: amazon/dynamodb-local:latest
ports:
- 28002:8000
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -37,16 +68,35 @@ jobs:
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: |
${{ env.testdir }}/go.sum
- id: install-minio-cli
uses: yakubique/setup-minio-cli@d9826c1ad14228495203415557139d4cf491bed9 # v1.0.0
- name: Download Go modules
working-directory: ${{ env.testdir }}
shell: bash
run: go mod download
- name: Setup Docker
- name: Migrate DynamoDB
timeout-minutes: 1
working-directory: ${{ env.testdir }}
env:
DOCKER_BUILDKIT: 1
AWS_ACCESS_KEY_ID: DUMMYACCESSKEYEXAMPLE
AWS_SECRET_ACCESS_KEY: DUMMYSECRETKEYEXAMPLE
AWS_DEFAULT_REGION: ap-northeast-1
shell: bash
run: |
until (aws dynamodb list-tables --endpoint-url http://127.0.0.1:28002 --output text) do echo '...waiting...' && sleep 1; done;
aws dynamodb create-table --cli-input-json file:///${{ github.workspace }}/aws/docker/dynamodb/table_test.json --endpoint-url http://localhost:28002
- name: Migrate Minio
timeout-minutes: 1
working-directory: ${{ env.testdir }}
shell: bash
run: |
docker compose up -d --wait --wait-timeout 30
mc alias set s3 http://127.0.0.1:29000 DUMMYACCESSKEYEXAMPLE DUMMYSECRETKEYEXAMPLE
mc --quiet mb s3/test
mc --quiet anonymous set upload s3/test
mc --quiet anonymous set download s3/test
mc --quiet policy set-json /policies/policy_test.json s3/test
- name: Test
working-directory: ${{ env.testdir }}
run: |
Expand Down

0 comments on commit aea3a35

Please sign in to comment.