266 lines
8.5 KiB
YAML
266 lines
8.5 KiB
YAML
name: Build, Lint & Test Lib
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, closed]
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build_job:
|
|
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
|
|
runs-on: ubuntu-latest
|
|
name: Built, Lint and Test Library
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Installing Dependencies
|
|
run: npm ci
|
|
|
|
- name: Linting Library
|
|
run: npm run lint-lib
|
|
|
|
- name: Testing Frontend
|
|
run: npm run test-lib-ci
|
|
|
|
- name: Coveralls
|
|
uses: coverallsapp/github-action@master
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
path-to-lcov: './coverage/oidc-client-rx/lcov.info'
|
|
|
|
- name: Coveralls Finished
|
|
uses: coverallsapp/github-action@master
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
parallel-finished: true
|
|
|
|
- name: Building Frontend
|
|
run: npm run build-lib-prod
|
|
|
|
- name: Copying essential additional files
|
|
run: npm run copy-files
|
|
|
|
- name: Show files
|
|
run: ls
|
|
|
|
- name: Upload Artefact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: angular_auth_oidc_client_artefact
|
|
path: dist/oidc-client-rx
|
|
|
|
AngularLatestVersion:
|
|
needs: build_job
|
|
runs-on: ubuntu-latest
|
|
name: Angular latest
|
|
steps:
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Download Artefact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: angular_auth_oidc_client_artefact
|
|
path: oidc-client-rx-artefact
|
|
|
|
- name: Install AngularCLI globally
|
|
run: sudo npm install -g @angular/cli
|
|
|
|
- name: Show ng Version
|
|
run: ng version
|
|
|
|
- name: Create Angular Project
|
|
run: sudo ng new oidc-client-rx-test --skip-git
|
|
|
|
- name: Npm Install & Install Library from local artefact
|
|
run: |
|
|
sudo cp -R oidc-client-rx-artefact oidc-client-rx-test/
|
|
cd oidc-client-rx-test
|
|
sudo npm install --unsafe-perm=true
|
|
sudo ng add ./oidc-client-rx-artefact --authority-url-or-tenant-id "my-authority-url" --flow-type "OIDC Code Flow PKCE using refresh tokens" --use-local-package=true --skip-confirmation
|
|
|
|
- name: Test Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: npm test -- --watch=false --browsers=ChromeHeadless
|
|
|
|
- name: Build Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: sudo npm run build
|
|
|
|
AngularLatestVersionWithSchematics:
|
|
needs: build_job
|
|
runs-on: ubuntu-latest
|
|
name: Angular latest & Schematics Job
|
|
steps:
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Download Artefact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: angular_auth_oidc_client_artefact
|
|
path: oidc-client-rx-artefact
|
|
|
|
- name: Install AngularCLI globally
|
|
run: sudo npm install -g @angular/cli
|
|
|
|
- name: Show ng Version
|
|
run: ng version
|
|
|
|
- name: Create Angular Project
|
|
run: sudo ng new oidc-client-rx-test --skip-git
|
|
|
|
- name: Npm Install & Install Library from local artefact
|
|
run: |
|
|
sudo cp -R oidc-client-rx-artefact oidc-client-rx-test/
|
|
cd oidc-client-rx-test
|
|
sudo npm install --unsafe-perm=true
|
|
sudo ng add ./oidc-client-rx-artefact --authority-url-or-tenant-id "my-authority-url" --flow-type "Default config" --use-local-package=true --skip-confirmation
|
|
|
|
- name: Test Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: npm test -- --watch=false --browsers=ChromeHeadless
|
|
|
|
- name: Build Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: sudo npm run build
|
|
|
|
AngularLatestVersionWithNgModuleSchematics:
|
|
needs: build_job
|
|
runs-on: ubuntu-latest
|
|
name: Angular latest Standalone & Schematics Job
|
|
steps:
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Download Artefact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: angular_auth_oidc_client_artefact
|
|
path: oidc-client-rx-artefact
|
|
|
|
- name: Install AngularCLI globally
|
|
run: sudo npm install -g @angular/cli
|
|
|
|
- name: Show ng Version
|
|
run: ng version
|
|
|
|
- name: Create Angular Project
|
|
run: sudo ng new oidc-client-rx-test --skip-git --standalone=false
|
|
|
|
- name: Npm Install & Install Library from local artefact
|
|
run: |
|
|
sudo cp -R oidc-client-rx-artefact oidc-client-rx-test/
|
|
cd oidc-client-rx-test
|
|
sudo npm install --unsafe-perm=true
|
|
sudo ng add ./oidc-client-rx-artefact --authority-url-or-tenant-id "my-authority-url" --flow-type "OIDC Code Flow PKCE using refresh tokens" --use-local-package=true --skip-confirmation
|
|
|
|
- name: Test Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: npm test -- --watch=false --browsers=ChromeHeadless
|
|
|
|
- name: Build Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: sudo npm run build
|
|
|
|
Angular16VersionWithRxJs6:
|
|
needs: build_job
|
|
runs-on: ubuntu-latest
|
|
name: Angular 16 & RxJs 6
|
|
steps:
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Download Artefact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: angular_auth_oidc_client_artefact
|
|
path: oidc-client-rx-artefact
|
|
|
|
- name: Install AngularCLI globally
|
|
run: sudo npm install -g @angular/cli@16
|
|
|
|
- name: Show ng Version
|
|
run: ng version
|
|
|
|
- name: Create Angular Project
|
|
run: sudo ng new oidc-client-rx-test --skip-git
|
|
|
|
- name: npm install RxJs 6
|
|
working-directory: ./oidc-client-rx-test
|
|
run: sudo npm install rxjs@6.5.3
|
|
|
|
- name: Npm Install & Install Library from local artefact
|
|
run: |
|
|
sudo cp -R oidc-client-rx-artefact oidc-client-rx-test/
|
|
cd oidc-client-rx-test
|
|
sudo npm install --unsafe-perm=true
|
|
sudo ng add ./oidc-client-rx-artefact --authority-url-or-tenant-id "my-authority-url" --flow-type "OIDC Code Flow PKCE using refresh tokens" --use-local-package=true --skip-confirmation
|
|
|
|
- name: Test Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: npm test -- --watch=false --browsers=ChromeHeadless
|
|
|
|
- name: Build Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: sudo npm run build
|
|
|
|
LibWithAngularV16:
|
|
needs: build_job
|
|
runs-on: ubuntu-latest
|
|
name: Angular V16
|
|
steps:
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Download Artefact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: angular_auth_oidc_client_artefact
|
|
path: oidc-client-rx-artefact
|
|
|
|
- name: Install AngularCLI globally
|
|
run: sudo npm install -g @angular/cli@16
|
|
|
|
- name: Show ng Version
|
|
run: ng version
|
|
|
|
- name: Create Angular Project
|
|
run: sudo ng new oidc-client-rx-test --skip-git
|
|
|
|
- name: Npm Install & Install Library from local artefact
|
|
run: |
|
|
sudo cp -R oidc-client-rx-artefact oidc-client-rx-test/
|
|
cd oidc-client-rx-test
|
|
sudo npm install --unsafe-perm=true
|
|
sudo ng add ./oidc-client-rx-artefact --authority-url-or-tenant-id "my-authority-url" --flow-type "OIDC Code Flow PKCE using refresh tokens" --use-local-package=true --skip-confirmation
|
|
|
|
- name: Test Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: npm test -- --watch=false --browsers=ChromeHeadless
|
|
|
|
- name: Build Angular Application
|
|
working-directory: ./oidc-client-rx-test
|
|
run: sudo npm run build
|