Repository navigation
81 lines (68 loc) · 2.61 KB
/
Copy pathnative-cli-example.yaml
File metadata and controls
81 lines (68 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: native-cli-example
# Keeps examples/native-cli running: the CLI against the OpenID Provider local recipe, both flows,
# with a virtual authenticator standing in for the user's passkey. The weekly run catches a change
# in the pinned images or the published packages breaking the example.
on:
pull_request:
paths:
- 'examples/native-cli/**'
- '.github/workflows/native-cli-example.yaml'
schedule:
- cron: '11 6 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# The recipe builds the API from source until API v0.23.0 is published
# (fells-code/seamless-auth-api#561), though this example uses nothing new in it.
RECIPE_REF: 30be59b557ad109a93aff68695f0fb21ff2ef84d
jobs:
example:
name: CLI, loopback and device flows, end to end
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: examples/native-cli
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Checkout the local recipe
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: fells-code/seamless-auth-oidc-provider
ref: ${{ env.RECIPE_REF }}
path: .recipe
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: examples/native-cli/package-lock.json
- name: Bring the recipe up
run: '${GITHUB_WORKSPACE}/.recipe/local/up.sh'
- name: Install the example
run: |
npm ci
sudo apt-get update
sudo apt-get install -y dbus-x11 gnome-keyring
npx playwright install --with-deps chromium
- name: Register the CLI's client
run: node scripts/register-client.mjs "${GITHUB_WORKSPACE}/.recipe/local"
- name: Run the example end to end
env:
RECIPE_DIR: ${{ github.workspace }}/.recipe/local
run: dbus-run-session -- bash e2e/with-keyring.sh node e2e/run.mjs
- name: Service logs
if: failure()
working-directory: .recipe/local
run: docker compose --env-file settings.env logs --no-color --tail 200
- name: Upload screenshots
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: native-cli-screenshots
path: examples/native-cli/e2e/screenshots/
if-no-files-found: ignore
retention-days: 7