Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build and Test Examples

on:
merge_group:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
example-fastify-web:
name: Web App
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- name: Setup Node.js with npm caching
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
package-manager-cache: false

- name: Update npm
run: npm install -g npm@11.10.0

- name: Install dependencies
run: npm install

# The example imports @auth0/auth0-fastify from its built dist, so the
# SDK must be built before the example can build.
- name: Build auth0-fastify
run: npm run build -w @auth0/auth0-fastify

- name: Build example-fastify-web
run: npm run build -w example-fastify-web

example-fastify-api:
name: API
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- name: Setup Node.js with npm caching
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
package-manager-cache: false

- name: Update npm
run: npm install -g npm@11.10.0

- name: Install dependencies
run: npm install

# The example imports @auth0/auth0-fastify-api from its built dist, so the
# SDK must be built before the example can build.
- name: Build auth0-fastify-api
run: npm run build -w @auth0/auth0-fastify-api

- name: Build example-fastify-api
run: npm run build -w example-fastify-api
3 changes: 2 additions & 1 deletion examples/example-fastify-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"type": "module",
"scripts": {
"start": "tsx src/index.ts --project tsconfig.json"
"start": "tsx src/index.ts --project tsconfig.json",
"build": "tsc --project tsconfig.json"
},
"devDependencies": {
"ts-node": "^10.9.2",
Expand Down
Loading