48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
# Runs this action against a real PostgREST-compatible project on every push and once a day.
|
|
# The endpoint and anon key live in repository secrets; nothing is committed.
|
|
name: Self-test (real endpoint)
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
schedule:
|
|
- cron: "23 5 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
|
|
jobs:
|
|
ping:
|
|
# secrets are not available to pull requests from forks
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Ping with table read and rpc
|
|
id: ping
|
|
uses: ./
|
|
with:
|
|
url: ${{ secrets.TEST_SUPABASE_URL }}
|
|
anon-key: ${{ secrets.TEST_SUPABASE_ANON_KEY }}
|
|
table: keepalive
|
|
rpc: keepalive_ping
|
|
|
|
- name: Show outputs
|
|
run: |
|
|
echo "status=${{ steps.ping.outputs.status }}"
|
|
echo "rest-status=${{ steps.ping.outputs.rest-status }}"
|
|
echo "query-status=${{ steps.ping.outputs.query-status }}"
|
|
echo "paused=${{ steps.ping.outputs.paused }}"
|
|
echo "last-success-days=${{ steps.ping.outputs.last-success-days }}"
|
|
|
|
- name: Ping with no query configured (expects a warning, not a failure)
|
|
uses: ./
|
|
with:
|
|
url: ${{ secrets.TEST_SUPABASE_URL }}
|
|
anon-key: ${{ secrets.TEST_SUPABASE_ANON_KEY }}
|
|
github-token: ""
|