chore: add docker-compose with SQS for local and CI tests #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "*.md" | |
| - "docs/**" | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "*.md" | |
| - "docs/**" | |
| permissions: | |
| actions: read | |
| contents: read | |
| pull-requests: read | |
| env: | |
| AWS_DEFAULT_REGION: "us-east-1" | |
| AWS_ENDPOINT_URL: "http://localhost:4566" | |
| AWS_ACCESS_KEY_ID: "test" | |
| AWS_SECRET_ACCESS_KEY: "test" # pragma: allowlist secret | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] # eventually add `windows-latest` | |
| python-version: ["3.10", "3.11", "3.12"] | |
| services: | |
| ministack: | |
| image: ministackorg/ministack:1.3.53 | |
| ports: | |
| - 4566:4566 | |
| env: | |
| AWS_DEFAULT_REGION: us-east-1 | |
| GATEWAY_PORT: 4566 | |
| MINISTACK_ACCOUNT_ID: "000000000000" | |
| MINISTACK_REGION: us-east-1 | |
| LOG_LEVEL: INFO | |
| options: >- | |
| --health-cmd "curl -f http://localhost:4566/_ministack/health" | |
| --health-interval 2s | |
| --health-timeout 5s | |
| --health-retries 30 | |
| --health-start-period 5s | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - id: setup-uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | |
| with: | |
| enable-cache: true | |
| cache-suffix: ${{ matrix.python-version }} | |
| version: "latest" | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Dependencies | |
| run: uv sync --all-extras | |
| - name: Run tests | |
| run: uv run pytest |