Skip to content

Add issuer as an initialization parameter #19

Add issuer as an initialization parameter

Add issuer as an initialization parameter #19

Workflow file for this run

# This workflow will build PRs submitted to the main branch.
name: 👷‍♂️ PR Builder
on:
pull_request:
branches: [main]
paths-ignore:
- '**/*.md'
- 'LICENSE'
workflow_dispatch:
# Avoid running multiple builds for the same PR.
concurrency:
group: pr-builder-${{ github.ref }}
cancel-in-progress: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
lint:
name: 🌳 ESLint (STATIC ANALYSIS)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🥡 Setup pnpm
id: setup-pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}
run_install: false
- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: 🐳 Set SHAs for Nx
id: set-shas
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'main'
- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: |
pwd
ls -l
tree -L 1
ls -l pnpm-lock.yaml
pnpm store prune
pnpm install
- name: 🏗️ Build Project
id: build
run: pnpm build
- name: 🌳 Lint ES Files
id: lint-with-eslint
run: pnpm nx affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --target=lint:es --parallel=3
- name: 💅 Lint Styles
id: lint-with-stylelint
run: |
pnpm nx affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --target=lint:styles --parallel=3
typecheck:
name: ʦ Typecheck (STATIC ANALYSIS)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🥡 Setup pnpm
id: setup-pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}
run_install: false
- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: 🐳 Set SHAs for Nx
id: set-shas
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'main'
- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install
- name: 🏗️ Build Project
id: build
run: pnpm build
- name: ☄️ Check Type Errors
run: pnpm nx affected --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }} --target=typecheck --parallel=3
test:
name: 👾 Unit Tests
needs: [lint, typecheck]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🥡 Setup pnpm
id: setup-pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}
run_install: false
- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install
- name: 🏗️ Build Project
id: build
run: pnpm build
- name: 🃏 Run Unit Tests
id: run-tests
run: pnpm test
- name: Upload `@asgardeo/mcp-node` coverage reports to Codecov
id: upload-asgardeo-mcp-node-coverage
uses: codecov/codecov-action@v4
with:
token: ${{ env.CODECOV_TOKEN }}
files: ./packages/mcp-node/coverage/coverage-final.json
flags: '@asgardeo/mcp-node'
verbose: true
- name: Upload `@asgardeo/mcp-express` coverage reports to Codecov
id: upload-asgardeo-mcp-express-coverage
uses: codecov/codecov-action@v4
with:
token: ${{ env.CODECOV_TOKEN }}
files: ./packages/mcp-express/coverage/coverage-final.json
flags: '@asgardeo/mcp-express'
verbose: true
build:
name: 🚧 Build
needs: [lint, typecheck, test]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/checkout@v4
- name: 🥡 Setup pnpm
id: setup-pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ matrix.pnpm-version }}
run_install: false
- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install
- name: 🏗️ Build Project
id: build
run: pnpm build