8889e0d39a
* events: fix lint Signed-off-by: Jens Langhammer <jens@goauthentik.io> * test without explicit poetry env use? Signed-off-by: Jens Langhammer <jens@goauthentik.io> * delete previous poetry env Signed-off-by: Jens Langhammer <jens@goauthentik.io> * prevent invalid cached poetry envs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * run test-from-stable as matrix and make required Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix missing postgres version Signed-off-by: Jens Langhammer <jens@goauthentik.io> * sigh Signed-off-by: Jens Langhammer <jens@goauthentik.io> * idk Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: "Setup authentik testing environment"
|
|
description: "Setup authentik testing environment"
|
|
|
|
inputs:
|
|
postgresql_version:
|
|
description: "Optional postgresql image tag"
|
|
default: "12"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install poetry & deps
|
|
shell: bash
|
|
run: |
|
|
pipx install poetry || true
|
|
sudo apt-get update
|
|
sudo apt-get install --no-install-recommends -y libpq-dev openssl libxmlsec1-dev pkg-config gettext
|
|
- name: Setup python and restore poetry
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version-file: 'pyproject.toml'
|
|
cache: "poetry"
|
|
- name: Setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: web/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: web/package-lock.json
|
|
- name: Setup go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version-file: "go.mod"
|
|
- name: Setup dependencies
|
|
shell: bash
|
|
run: |
|
|
export PSQL_TAG=${{ inputs.postgresql_version }}
|
|
docker-compose -f .github/actions/setup/docker-compose.yml up -d
|
|
poetry install
|
|
cd web && npm ci
|
|
- name: Generate config
|
|
shell: poetry run python {0}
|
|
run: |
|
|
from authentik.lib.generators import generate_id
|
|
from yaml import safe_dump
|
|
|
|
with open("local.env.yml", "w") as _config:
|
|
safe_dump(
|
|
{
|
|
"log_level": "debug",
|
|
"secret_key": generate_id(),
|
|
},
|
|
_config,
|
|
default_flow_style=False,
|
|
)
|