Skip to content

Pin wrangler version to fix hanging miniflare invocations #44

Pin wrangler version to fix hanging miniflare invocations

Pin wrangler version to fix hanging miniflare invocations #44

Workflow file for this run

name: LocalStack Miniflare Extension Tests
on:
push:
paths:
- miniflare/**
branches:
- main
pull_request:
paths:
- .github/workflows/miniflare.yml
- miniflare/**
workflow_dispatch:
jobs:
tests-miniflare:
name: Run extension tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install LocalStack and extension
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
run: |
docker pull localstack/localstack-pro &
pip install localstack localstack-ext
# TODO remove
mkdir ~/.localstack; echo '{"token":"test"}' > ~/.localstack/auth.json
branchName=${GITHUB_HEAD_REF##*/}
if [ "$branchName" = "" ]; then branchName=main; fi
echo "Installing from branch name $branchName"
localstack extensions init
localstack extensions install "git+https://github.com/localstack/localstack-extensions.git@"$branchName"#egg=localstack-extension-miniflare&subdirectory=miniflare"
DEBUG=1 localstack start -d
localstack wait
curl http://localhost:4566/_localstack/health
curl http://localhost:4566/miniflare/user
- name: Run test
env:
CLOUDFLARE_API_TOKEN: test
CLOUDFLARE_API_BASE_URL: "https://localhost.localstack.cloud:4566/miniflare"
run: |
cd miniflare/example
npm install
npm run deploy
curl http://hello.miniflare.localhost.localstack.cloud:4566/test | grep 'Hello World'
- name: Print LocalStack logs
if: always()
run: localstack logs