Feat/basic auth extension #210
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} | |
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: [18] | |
steps: | |
- name: check out repo | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
- 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 | |
# build things | |
- name: build | |
run: npm run build | |
- 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 |