updated localstack dependencies, added build cache

This commit is contained in:
mmetc 2022-12-21 12:20:01 +01:00 committed by GitHub
parent a32aa96752
commit ff88faf402
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 13 deletions

View file

@ -23,7 +23,6 @@ on:
env: env:
RICHGO_FORCE_COLOR: 1 RICHGO_FORCE_COLOR: 1
AWS_HOST: localstack AWS_HOST: localstack
SERVICES: cloudwatch,logs,kinesis
# these are to mimic aws config # these are to mimic aws config
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
@ -43,17 +42,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: services:
localstack: localstack:
image: localstack/localstack:0.13.3 image: localstack/localstack:1.3.0
ports: ports:
- 4566:4566 # Localstack exposes all services on the same port - 4566:4566 # Localstack exposes all services on the same port
env: env:
SERVICES: ${{ env.SERVICES }}
DEBUG: "" DEBUG: ""
DATA_DIR: ""
LAMBDA_EXECUTOR: "" LAMBDA_EXECUTOR: ""
KINESIS_ERROR_PROBABILITY: "" KINESIS_ERROR_PROBABILITY: ""
DOCKER_HOST: unix:///var/run/docker.sock DOCKER_HOST: unix:///var/run/docker.sock
HOST_TMP_FOLDER: "/tmp"
KINESIS_INITIALIZE_STREAMS: ${{ env.KINESIS_INITIALIZE_STREAMS }} KINESIS_INITIALIZE_STREAMS: ${{ env.KINESIS_INITIALIZE_STREAMS }}
HOSTNAME_EXTERNAL: ${{ env.AWS_HOST }} # Required so that resource urls are provided properly HOSTNAME_EXTERNAL: ${{ env.AWS_HOST }} # Required so that resource urls are provided properly
# e.g sqs url will get localhost if we don't set this env to map our service # e.g sqs url will get localhost if we don't set this env to map our service
@ -64,7 +60,7 @@ jobs:
--health-timeout=5s --health-timeout=5s
--health-retries=3 --health-retries=3
zoo1: zoo1:
image: confluentinc/cp-zookeeper:7.1.1 image: confluentinc/cp-zookeeper:7.3.0
ports: ports:
- "2181:2181" - "2181:2181"
env: env:
@ -128,6 +124,18 @@ jobs:
fetch-depth: 0 fetch-depth: 0
submodules: false submodules: false
- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-${{ matrix.go-version }}-go-
- name: Build and run tests - name: Build and run tests
run: | run: |
go install github.com/ory/go-acc@v0.2.8 go install github.com/ory/go-acc@v0.2.8

View file

@ -176,7 +176,7 @@ wowo: ajsajasjas
yaml.Unmarshal([]byte(tc.String), &common) yaml.Unmarshal([]byte(tc.String), &common)
ds, err := DataSourceConfigure(common) ds, err := DataSourceConfigure(common)
cstest.RequireErrorContains(t, err, tc.ExpectedError) cstest.RequireErrorContains(t, err, tc.ExpectedError)
if tc.ExpectedError == "" { if tc.ExpectedError != "" {
return return
} }

View file

@ -3,7 +3,7 @@ version: "3.8"
services: services:
localstack: localstack:
container_name: localstack_main container_name: localstack_main
image: localstack/localstack image: localstack/localstack:1.3.0
network_mode: bridge network_mode: bridge
ports: ports:
- "127.0.0.1:53:53" # only required for Pro (DNS) - "127.0.0.1:53:53" # only required for Pro (DNS)
@ -13,13 +13,10 @@ services:
- "127.0.0.1:4566:4566" # LocalStack Edge Proxy - "127.0.0.1:4566:4566" # LocalStack Edge Proxy
environment: environment:
AWS_HOST: localstack AWS_HOST: localstack
SERVICES: "cloudwatch,logs,kinesis"
DEBUG: "" DEBUG: ""
DATA_DIR: ""
LAMBDA_EXECUTOR: "" LAMBDA_EXECUTOR: ""
KINESYS_ERROR_PROBABILITY: "" KINESYS_ERROR_PROBABILITY: ""
DOCKER_HOST: "unix://var/run/docker.sock" DOCKER_HOST: "unix://var/run/docker.sock"
HOST_TMP_FOLDER: "/tmp"
KINESIS_INITIALIZE_STREAMS: "stream-1-shard:1,stream-2-shards:2" KINESIS_INITIALIZE_STREAMS: "stream-1-shard:1,stream-2-shards:2"
HOSTNAME_EXTERNAL: "localstack" HOSTNAME_EXTERNAL: "localstack"
AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE"
@ -28,11 +25,11 @@ services:
AWS_ENDPOINT_FORCE: "http://localhost:4566" AWS_ENDPOINT_FORCE: "http://localhost:4566"
volumes: volumes:
- "${TMPDIR:-/tmp}/localstack:/tmp/localstack" - "${TMPDIR:-/tmp}/localstack:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
zoo1: zoo1:
image: confluentinc/cp-zookeeper:7.1.1 image: confluentinc/cp-zookeeper:7.3.0
ports: ports:
- "2181:2181" - "2181:2181"
environment: environment: