2022-10-18 21:53:31 +00:00
|
|
|
name: 'Setup authentik testing environment'
|
|
|
|
description: 'Setup authentik testing environment'
|
2022-04-04 12:02:10 +00:00
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Install poetry
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pipx install poetry || true
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y libxmlsec1-dev pkg-config gettext
|
|
|
|
- name: Setup python and restore poetry
|
|
|
|
uses: actions/setup-python@v3
|
|
|
|
with:
|
2022-11-13 13:20:55 +00:00
|
|
|
python-version: '3.11'
|
2022-04-04 12:02:10 +00:00
|
|
|
cache: 'poetry'
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v3.1.0
|
|
|
|
with:
|
2023-02-09 21:06:03 +00:00
|
|
|
node-version: '18'
|
2022-04-04 12:02:10 +00:00
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: web/package-lock.json
|
|
|
|
- name: Setup dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
docker-compose -f .github/actions/setup/docker-compose.yml up -d
|
2022-11-13 13:20:55 +00:00
|
|
|
poetry env use python3.11
|
2022-04-04 12:02:10 +00:00
|
|
|
poetry install
|
2022-09-06 22:23:25 +00:00
|
|
|
cd web && npm ci
|
2022-04-04 12:02:10 +00:00
|
|
|
- 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,
|
|
|
|
)
|