Skip to content

feat(auth): new auth with cert service #284

feat(auth): new auth with cert service

feat(auth): new auth with cert service #284

name: auth
on:
pull_request_target:
paths:
# relevant
- "client-side-js/**"
- "examples/**"
- "scripts/**"
- "src/**"
# don't run on changes to these
- "!.husky/**"
- "!.vscode/**"
- "!docs/**"
- "!.*"
- "!*.md"
- "!*.cjs"
env:
wdi5_username: ${{secrets.BTP_LOGIN}}
wdi5_one_username: ${{secrets.BTP_LOGIN}}
wdi5_two_username: ${{secrets.BTP_LOGIN}}
wdi5_password: ${{secrets.BTP_PASSWORD}}
wdi5_one_password: ${{secrets.BTP_PASSWORD}}
wdi5_two_password: ${{secrets.BTP_PASSWORD}}
wdi5_wz_username: ${{secrets.WZ_USER}}
wdi5_wz_password: ${{secrets.WZ_PASSWORD}}
BROWSERSTACK_USERNAME: ${{secrets.BROWSERSTACK_USERNAME}}
BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
SAUCE_USERNAME: ${{secrets.SAUCE_USERNAME}}
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}
SAPPFX_BASE64: ${{secrets.SAPPFX_BASE64}}
SAPPFX_PASSPHRASE: ${{secrets.SAPPFX_PASSPHRASE}}
jobs:
authorize:
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
tests:
needs: authorize
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: check out repo
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
submodules: recursive
- name: use node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "**/package-lock.json"
# install both module + sample app(s) deps
- name: install packages (wdi5 + sample app(s))
run: |
npm pkg delete scripts.prepare
npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
# build things
- name: build
run: npm run build
- name: Create PFX file from secret
env:
SAPPFX_BASE64: ${{ secrets.SAPPFX_BASE64 }}
run: |
echo "$SAPPFX_BASE64" | base64 -d > examples/ui5-ts-app/sap.pfx
# this against the submodule cloned from https://github.com/SAP-samples/cap-bookshop-wdi5
- name: local CAP authentication
run: npm run test:capAuth
# this against deployed TS sample app on BTP
- name: (browserstack) btp/sap cloud id, basic auth, office 365, custom auth
run: BROWSERSTACK=true npm run test:auth
# these two run against the deployed CAP SFLIGHT sample app in BTP WorkZone
- name: test lib support for workzone
run: npm run test:wz:testlib
- name: regular support for workzone
run: npm run test:wz:regular