|
24 | 24 | id-token: write |
25 | 25 | env: |
26 | 26 | RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.event.client_payload.version}} |
| 27 | + LSTK_CONFIG_FILE: ${{ runner.temp }}/lstk-config.toml |
27 | 28 |
|
28 | 29 | steps: |
29 | 30 | - name: "Pull Image (localstack/localstack-pro:${{ env.RELEASE_VERSION }})" |
@@ -64,16 +65,26 @@ jobs: |
64 | 65 | - name: "Install Project" |
65 | 66 | run: make install-dev |
66 | 67 |
|
67 | | - - name: "Install LocalStack" |
68 | | - run: pip install localstack==${RELEASE_VERSION} |
| 68 | + - name: "Install lstk" |
| 69 | + run: npm install -g @localstack/lstk |
| 70 | + |
| 71 | + - name: "Configure lstk" |
| 72 | + # The config pins the emulator image to the release version. It lives outside |
| 73 | + # the workspace so the "Check Uncommitted Changes" step stays clean. |
| 74 | + run: | |
| 75 | + cat > "${LSTK_CONFIG_FILE}" <<EOF |
| 76 | + [[containers]] |
| 77 | + type = "aws" |
| 78 | + tag = "${RELEASE_VERSION}" |
| 79 | + port = "4566" |
| 80 | + EOF |
69 | 81 |
|
70 | 82 | - name: "Start Localstack" |
71 | 83 | env: |
72 | | - LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} |
73 | | - run: | |
74 | | - source .venv/bin/activate |
75 | | - DEBUG=1 DISABLE_EVENTS="1" IMAGE_NAME="localstack/localstack-pro:${RELEASE_VERSION}" localstack start -d |
76 | | - localstack wait -t 120 || (python -m localstack.cli.main logs && false) |
| 84 | + LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} |
| 85 | + LOCALSTACK_DEBUG: "1" |
| 86 | + LOCALSTACK_DISABLE_EVENTS: "1" |
| 87 | + run: lstk --config "${LSTK_CONFIG_FILE}" start --timeout 2m |
77 | 88 |
|
78 | 89 | - name: "Run Python Tests" |
79 | 90 | env: |
|
83 | 94 | - name: "Stop Localstack" |
84 | 95 | if: success() || failure() |
85 | 96 | run: | |
86 | | - source .venv/bin/activate |
87 | | - localstack logs |
88 | | - localstack stop |
| 97 | + lstk --config "${LSTK_CONFIG_FILE}" logs |
| 98 | + lstk --config "${LSTK_CONFIG_FILE}" stop |
89 | 99 |
|
90 | 100 | - name: "Check Uncommitted Changes" |
91 | 101 | run: | |
|
0 commit comments