diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 207fa92..dcd94c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,16 +64,27 @@ jobs: - name: "Install Project" run: make install-dev - - name: "Install LocalStack" - run: pip install localstack==${RELEASE_VERSION} + - name: "Install lstk" + run: npm install -g @localstack/lstk + + - name: "Configure lstk" + # The config pins the emulator image to the release version. It lives outside + # the workspace so the "Check Uncommitted Changes" step stays clean. + run: | + cat > "${RUNNER_TEMP}/lstk-config.toml" <> "$GITHUB_ENV" - name: "Start Localstack" env: - LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} - run: | - source .venv/bin/activate - DEBUG=1 DISABLE_EVENTS="1" IMAGE_NAME="localstack/localstack-pro:${RELEASE_VERSION}" localstack start -d - localstack wait -t 120 || (python -m localstack.cli.main logs && false) + LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} + LOCALSTACK_DEBUG: "1" + LOCALSTACK_DISABLE_EVENTS: "1" + run: lstk --config "${LSTK_CONFIG_FILE}" start --timeout 2m - name: "Run Python Tests" env: @@ -83,9 +94,8 @@ jobs: - name: "Stop Localstack" if: success() || failure() run: | - source .venv/bin/activate - localstack logs - localstack stop + lstk --config "${LSTK_CONFIG_FILE}" logs + lstk --config "${LSTK_CONFIG_FILE}" stop - name: "Check Uncommitted Changes" run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index acfe316..0da1438 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,21 +33,23 @@ jobs: run: | make install-dev - - name: Install LocalStack + - name: Install lstk run: | - pip install --pre --upgrade localstack + npm install -g @localstack/lstk - name: Pull image run: | docker pull localstack/localstack-pro + # lstk defaults to the aws emulator with image localstack/localstack-pro:latest, + # so no config file is needed here. - name: Start Localstack env: - LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} + LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} + LOCALSTACK_DEBUG: "1" + LOCALSTACK_DISABLE_EVENTS: "1" run: | - source .venv/bin/activate - DEBUG=1 DISABLE_EVENTS="1" IMAGE_NAME="localstack/localstack-pro:latest" localstack start -d - localstack wait -t 120 || (python -m localstack.cli.main logs && false) + lstk start --timeout 2m - name: Run Python Tests env: @@ -58,6 +60,5 @@ jobs: - name: Stop Localstack if: always() run: | - source .venv/bin/activate - localstack logs - localstack stop + lstk logs + lstk stop