Skip to content

un-inline scripts (#3) #78

un-inline scripts (#3)

un-inline scripts (#3) #78

Workflow file for this run

name: Tests
on:
pull_request:
paths-ignore:
- 'README.md'
push:
branches:
- main
paths-ignore:
- 'README.md'
permissions:
contents: read
jobs:
test:
name: Test - ${{ matrix.cases.label }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
cases:
- label: "Stable"
options:
version: "stable"
sentry_env: "goauthentik-action-setup-authentik-ci"
- label: "Beta"
options:
version: "beta"
sentry_env: "goauthentik-action-setup-authentik-ci"
- label: "Blueprints + Custom wait"
options:
version: "stable"
sentry_env: "goauthentik-action-setup-authentik-ci"
blueprints_path: "./testing/blueprints"
wait_url: http://localhost:9000/application/o/test/.well-known/openid-configuration
- label: "Blueprints + External wait"
options:
version: "stable"
sentry_env: "goauthentik-action-setup-authentik-ci"
blueprints_path: "./testing/blueprints"
test: |
set -x
while true; do
objs=$(curl -s -H "Authorization: Bearer ${AUTHENTIK_BOOTSTRAP_TOKEN}" 'http://localhost:9000/api/v3/providers/all/?search=test')
count=$(echo $objs | jq .pagination.count)
if [[ "$count" == "1" ]]; then
exit 0
fi
sleep 5
done
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v3
- uses: ./
id: setup
with: ${{ matrix.cases.options }}
- if: ${{ matrix.cases.test != '' }}
timeout-minutes: 5
env:
AUTHENTIK_BOOTSTRAP_TOKEN: ${{ steps.setup.outputs.admin_token }}
run: ${{ matrix.cases.test }}