Skip to content

Commit dadfb21

Browse files
committed
Merge pull request #6 from ErikWegner/axum-0.8
Upgrade axum 0.8
2 parents 7d1f3ef + 5317812 commit dadfb21

27 files changed

+749
-377
lines changed

.devcontainer/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ services:
55
ports:
66
# Publish keycloak here, because network stack is shared
77
- "8101:8101"
8+
- "3000:3000"
89
volumes:
910
# Mount the root folder that contains .git
1011
- ..:/workspace:cached
@@ -17,7 +18,7 @@ services:
1718
image: erikwegner/rsecho:release-1.0.0
1819

1920
keycloak:
20-
image: quay.io/keycloak/keycloak:26.0.0
21+
image: quay.io/keycloak/keycloak:26.1.0
2122
command:
2223
- start-dev
2324
- --import-realm

.env.e2e-ci

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Required options
3+
#
4+
5+
RIDSER_BIND_PORT=3000
6+
RIDSER_BIND_ADDRESS="::"
7+
RUST_LOG=ridser=trace
8+
# Target for authenticated requests
9+
RIDSER_PROXY_TARGET=http://echo:3000/
10+
# Deny refresh requests as long as the session is valid for longer than this threshold
11+
RIDSER_SESSION_REFRESH_THRESHOLD=15
12+
# OpenID Connect Issuer
13+
RIDSER_OIDC_ISSUER_URL=http://localhost:8101/realms/multcorp
14+
# Client with user data access
15+
RIDSER_OIDC_CLIENT_ID=ridser
16+
# Secret for client with user data access
17+
RIDSER_OIDC_CLIENT_SECRET=8d476311-2577-4104-b9e4-7dc2cc381be8
18+
# Single sign on logout endpoint
19+
RIDSER_LOGOUT_SSO_URI=http://localhost:8101/realms/multcorp/protocol/openid-connect/logout
20+
# Redis cache configuration
21+
RIDSER_REDIS_URL=redis://redis:6379
22+
# Session secret, length in bytes: 64
23+
RIDSER_SESSION_SECRET=iIdh4cBut27H6Y5MCk9782bE3Nk56JVsahla1vhILE3tizmX5nP5riOhV8IgorzI
24+
# Disable secure cookies for webkit tests
25+
RIDSER_SESSION_SECURE_COOKIE_DISABLED=true
26+
27+
#
28+
# Optional
29+
30+
# Override authorization endpoint
31+
RIDSER_OIDC_AUTH_URL=http://localhost:8101/realms/multcorp/protocol/openid-connect/auth
32+
# Override cookie name for session cookie. Default name is "ridser.sid"
33+
RIDSER_SESSION_COOKIE_NAME=ridser.sid
34+
35+
# Comma separated list of allowed redirect uris after successful login. A trailing asterisk is allowed for wildcard matches.
36+
RIDSER_LOGIN_REDIRECT_APP_URIS=http://localhost:4800/*,http://localhost:4700/*,http://ridser.localhost/,http://localhost:3000/*
37+
# Comma separated list of allowed redirect uris after successful logout. Only exact matches are allowed.
38+
RIDSER_LOGOUT_REDIRECT_APP_URIS=http://localhost:4800/,http://localhost:3000/exampleapp/
39+
RIDSER_PROXY_TARGET_RULE_A=/num=>http://echo:3000/rule/a
40+
RIDSER_PROXY_TARGET_RULE_FOO=/foo=>http://echo:3000/foo-rule/abc
41+
RIDSER_PROXY_TARGET_RULE_BAR=/bar/me/no=>http://echo:3000/bar/bar/bar

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
check:
77
name: Check
88
runs-on: ubuntu-latest
9-
container: rust:1.82.0
9+
container: rust:1.84.0
1010
steps:
1111
- uses: actions/checkout@v2
1212
- uses: actions-rs/toolchain@v1
@@ -21,7 +21,7 @@ jobs:
2121
test:
2222
name: Test Suite
2323
runs-on: ubuntu-latest
24-
container: rust:1.82.0
24+
container: rust:1.84.0
2525
services:
2626
# Label used to access the service container
2727
redis:
@@ -47,7 +47,7 @@ jobs:
4747
fmt:
4848
name: Rustfmt
4949
runs-on: ubuntu-latest
50-
container: rust:1.82.0
50+
container: rust:1.84.0
5151
steps:
5252
- uses: actions/checkout@v2
5353
- uses: actions-rs/toolchain@v1
@@ -64,7 +64,7 @@ jobs:
6464
clippy:
6565
name: Clippy
6666
runs-on: ubuntu-latest
67-
container: rust:1.82.0
67+
container: rust:1.84.0
6868
steps:
6969
- uses: actions/checkout@v2
7070
- uses: actions-rs/toolchain@v1

.github/workflows/playwright.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
jobs:
8+
test:
9+
timeout-minutes: 60
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Run devcontainers, build binary
14+
run: |
15+
docker compose -f .devcontainer/docker-compose.yml up -d
16+
docker compose -f .devcontainer/docker-compose.yml exec ridser /bin/bash -c "rustup update stable"
17+
docker exec -i --user ${UID}:${GID} --workdir /workspace devcontainer-ridser-1 /bin/bash -c "cargo build"
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: lts/*
21+
- name: Install dependencies
22+
working-directory: ./tests
23+
run: npm ci
24+
- name: Install Playwright Browsers
25+
working-directory: ./tests
26+
run: npx playwright install --with-deps
27+
- name: Run Playwright tests
28+
working-directory: ./tests
29+
run: |
30+
docker exec -id --user ${UID}:${GID} --workdir /workspace devcontainer-ridser-1 /bin/bash -c "cp .env.default .env ; cargo run"
31+
export PLAYWRIGHT_HTML_OUTPUT_DIR=playwright-report/firefox_chromium/
32+
npx playwright test --project firefox --project chromium
33+
docker exec -id --user ${UID}:${GID} --workdir /workspace devcontainer-ridser-1 /bin/bash -c "killall ridser"
34+
docker exec -id --user ${UID}:${GID} --workdir /workspace devcontainer-ridser-1 /bin/bash -c "cp .env.e2e-ci .env ; cargo run"
35+
export PLAYWRIGHT_HTML_OUTPUT_DIR=playwright-report/webkit/
36+
npx playwright test --project webkit
37+
- uses: actions/upload-artifact@v4
38+
if: ${{ !cancelled() }}
39+
with:
40+
name: playwright-report
41+
path: tests/playwright-report/
42+
retention-days: 30

0 commit comments

Comments
 (0)