diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..73bc00c --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "semiannually" + cooldown: + default-days: 20 + groups: + github-actions: + patterns: + - "*" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..5988734 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,59 @@ +name: '🧪 Test' + +on: + push: + pull_request: + +permissions: {} + +concurrency: + group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}' + cancel-in-progress: true + +env: + NODE_VERSION: '24' + UV_VERSION: '0.12.0' + # PYTHON_VERSION is managed in the .python-version file. + +jobs: + test: + name: 'Test' + runs-on: 'ubuntu-24.04' + steps: + - name: 'Checkout' + uses: 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0' # v7.0.0 + with: + persist-credentials: 'false' + + - name: 'Setup Python' + uses: 'actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1' # v6.3.0 + with: + python-version-file: '.python-version' + + - name: 'Setup Node' + uses: 'actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e' # v6.4.0 + with: + node-version: '${{ env.NODE_VERSION }}' + + - name: 'Setup uv' + uses: 'astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990' # v8.3.2 + with: + version: '${{ env.UV_VERSION }}' + + - name: 'Start Supabase' + run: | + npx supabase start + + - name: 'Configure .env' + run: | + cp .env.example .env + KEY="$(npx supabase status --output=json | jq .PUBLISHABLE_KEY -r)" + echo "SUPABASE_PUBLISHABLE_KEY=${KEY}" >> .env + + - name: 'Run the Python test suite' + run: | + uv venv --no-managed-python + source .venv/bin/activate + uv pip install -e. --group=dev + + pytest