Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: authentication capabilities #369

Merged
merged 37 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9af5c76
feat: btp authenticator
Siolto Nov 2, 2022
916225b
feat: btp and basicauth authenticator
Siolto Nov 3, 2022
c5c3602
feat: add custom authenticator
Siolto Nov 4, 2022
0814756
feat: authenticator allow overwriting of the default selectors
Siolto Nov 7, 2022
a9aaa6c
chore(pipeline): update set script for npm v9
dominikfeininger Nov 10, 2022
1a27746
chore(pipeline): update set script for npm v9
dominikfeininger Nov 11, 2022
426430d
feat: add Office365 authentication method
monavari-lebrecht Nov 11, 2022
875922b
feat(auth): multi remote support
Siolto Nov 11, 2022
a550d58
refactor: simplify and generalize the authenticator configs
Siolto Nov 11, 2022
537c92b
feat(auth): add test for custom authentication
Siolto Nov 11, 2022
5fd58be
refactor(auth,custom): simplify to use base conf
vobu Nov 11, 2022
e40cbcb
test(auth,custom): meaningful expect
vobu Nov 11, 2022
1d75dba
ci(wip): trying if a 2nd path triggers the action
vobu Nov 11, 2022
912aeea
chore(deps): bump
vobu Nov 11, 2022
9765f56
chore(wdio): pin to ^7
vobu Nov 11, 2022
8b43c5b
Merge remote-tracking branch 'upstream/fix/pipelineNpmSetScript' into…
vobu Nov 11, 2022
067cf1e
Merge remote-tracking branch 'upstream/main' into feat/authenticator
vobu Nov 11, 2022
d245fd3
refactor: test spec location
vobu Nov 11, 2022
b708fdb
ci: prep headless auth test runs
vobu Nov 11, 2022
eebbd78
ci: add auth tests
vobu Nov 11, 2022
fcf06b3
fix(deps): add missing
vobu Nov 11, 2022
1e3d5d0
fix(deps): add missing
vobu Nov 11, 2022
1563bb4
ci: rename + script call change
vobu Nov 11, 2022
d510eae
ci: refactor concurrent jobs
vobu Nov 12, 2022
57f8f69
ci: better naming
vobu Nov 12, 2022
559330b
revert: npm 9 -> 8
vobu Nov 12, 2022
83aa890
refactor: split up test files again
vobu Nov 12, 2022
2b4b9c8
test(ts-app): exclude custom auth test
vobu Nov 12, 2022
9d16627
fix(npm-script): workspace script name
vobu Nov 12, 2022
7e763f7
test(ts-app): multiremote only for auth tests
vobu Nov 12, 2022
f555abe
ci: re-add credentials
vobu Nov 12, 2022
2bbefd5
chore(auth): export types
vobu Nov 14, 2022
8f7cb39
feat(auth,custom): throw if options missing
vobu Nov 14, 2022
9bf98c2
chore(auth,types): add staySignedIn option
vobu Nov 14, 2022
dc96220
chore(auth,btp): constructor param typing
vobu Nov 14, 2022
ecd65c5
ci(tmp): do a prerelease for the time being
vobu Nov 14, 2022
fab35e3
ci: prep 1.0 release
vobu Nov 14, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
# and generating changelog
# and tagging the release properly
# and auto-incrementing the release number
- run: npm run release
- run: npm run release -- --prerelease pre --release-as major
# push to self aka main from within gh action with "release-state"
# doesn't trigger this workflow again
# b/c of missing personal access token here
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-btp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
paths:
- "examples/ui5-ts-app/**"
- "!examples/ui5-js-app/**"

jobs:
publish-sample-ts-app-to-btp:
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/wdi5-tests_auth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: auth
on:
pull_request:
branches:
- main
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}}

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14, 16, 18, 19]

steps:
- name: update chrome
run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get --only-upgrade install google-chrome-stable
# check chrome version
google-chrome --version

- name: check out repo
uses: actions/checkout@v3

- name: use node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "**/package-lock.json"

# we need this for workspace mgmt
- name: check npm version >= 7
run: npm --version
- name: update npm
run: |
npm i -g npm@8
npm --version

# 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: btp/sap cloud id, basic auth, office 365, custom auth
run: npm run test:auth
25 changes: 16 additions & 9 deletions .github/workflows/wdi5-tests_core.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: wdi5 core tests

name: core
on:
pull_request:
branches:
- main
paths:
# relevant
- "client-side-js/**"
- "examples/**"
- "scripts/**"
- "src/**"
# don't run on changes to these
- "!client-side-js/**"
- "!examples/**"
- "!scripts/**"
- "!.husky/**"
- "!.vscode/**"
- "!docs/**"
Expand All @@ -19,14 +18,23 @@ on:
- "!*.cjs"

jobs:
test-wdi5-core:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14, 16, 18, 19]

steps:
- name: update chrome
run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get --only-upgrade install google-chrome-stable
# check chrome version
google-chrome --version

- name: check out repo
uses: actions/checkout@v3

Expand All @@ -42,19 +50,18 @@ jobs:
run: npm --version
- name: update npm
run: |
npm i -g npm@latest
npm i -g npm@8
npm --version

# install both module + sample app(s) deps
- name: install packages (wdi5 + sample app(s))
run: |
npm set-script prepare ""
npm pkg delete scripts.prepare
npm ci

# build things
- name: build
run: npm run build

# run wdi5 core tests
- name: test wdi5 core
run: npm test
9 changes: 4 additions & 5 deletions .github/workflows/wdi5-tests_fe-app.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: FE app - wdi5 tests

name: FE-app
on:
pull_request:
branches:
Expand All @@ -19,7 +18,7 @@ on:
- "!*.cjs"

jobs:
test-fe-app:
tests:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -51,13 +50,13 @@ jobs:
run: npm --version
- name: update npm
run: |
npm i -g npm@latest
npm i -g npm@8
npm --version

# install both module + sample app(s) deps
- name: install packages (wdi5 + sample app(s))
run: |
npm set-script prepare ""
npm pkg delete scripts.prepare
npm ci

# build things
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/wdi5-tests_js-app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: JS app - wdi5 tests
name: JS-app

on:
pull_request:
Expand All @@ -19,7 +19,7 @@ on:
- "!*.cjs"

jobs:
test-js-app:
tests:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -51,21 +51,19 @@ jobs:
run: npm --version
- name: update npm
run: |
npm i -g npm@latest
npm i -g npm@8
npm --version

# install both module + sample app(s) deps
- name: install packages (wdi5 + sample app(s))
run: |
npm set-script prepare ""
npm pkg delete scripts.prepare
npm ci

# build things
- name: build
run: npm run build

# run wdi5 core tests > moved to separate action

# run wdi5 tests within app(s)
- name: test js-app
run: npm run test-h:js-app
9 changes: 5 additions & 4 deletions .github/workflows/wdi5-tests_ts-app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: TS app - wdi5 tests
name: TS-app

on:
pull_request:
Expand All @@ -19,7 +19,7 @@ on:
- "!*.cjs"

jobs:
test-ts-app:
tests:
runs-on: ubuntu-latest

strategy:
Expand Down Expand Up @@ -51,18 +51,19 @@ jobs:
run: npm --version
- name: update npm
run: |
npm i -g npm@latest
npm i -g npm@8
npm --version

# install both module + sample app(s) deps
- name: install packages (wdi5 + sample app(s))
run: |
npm set-script prepare ""
npm pkg delete scripts.prepare
npm ci

# build things
- name: build
run: npm run build

# run wdi5 tests within app(s)
- name: test ts-app
run: npm run test-h:ts-app
10 changes: 5 additions & 5 deletions docker/package-standalone.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
},
"devDependencies": {
"@ui5/cli": "latest",
"@wdio/cli": "^7.19.6",
"@wdio/mocha-framework": "^7.19.5",
"@wdio/spec-reporter": "^7.19.5",
"@wdio/cli": "^7",
"@wdio/mocha-framework": "^7",
"@wdio/spec-reporter": "^7",
"chromedriver": "latest",
"@wdio/local-runner": "^7.19.5",
"@wdio/local-runner": "^7",
"fs-extra": "^10.1.0",
"mocha": "^9.2.2",
"npm-run-all": "^4.1.5",
"ui5-middleware-simpleproxy": "latest",
"wait-on": "^6.0.1",
"wdio-chromedriver-service": "^7",
"wdio-ui5-service": "latest",
"webdriverio": "^7.19.5"
"webdriverio": "^7"
},
"ui5": {
"dependencies": ["ui5-middleware-simpleproxy"]
Expand Down
Loading