Skip to content

Commit

Permalink
feat(repo): load system certs when custom cert specified
Browse files Browse the repository at this point in the history
* feat(repo): load system certs when custom cert specified

fixes #139

* fix(oauth): throw if cacheDir not writeable on Windows

* test(oauth): make cache dir read-only on Windows

* test(oauth): make cache dir deleteable on Windows

* test(oauth): make token cache dir read-only on Windows

* test(oauth): hack around Windows test not throwing

* refactor(repo): test self-signed certificate support

fixes #139 fixes #141

* test(repo): isolate unit tests and do not run in integration envs

* test(repo): run unit tests on Windows runner in CI

* feat(zeebe): update gRPC package dep version

* ci(repo): run unit tests on Windows for PRs

* ci(repo): use cross-env to support Windows runner in CI

* test(oauth): use execSync for Windows commands

* refactor(repo): use win-ca for Windows system certificates

* refactor(repo): refactor code to use win-ca on Windows

* refactor(oauth): debug log in CI

* revert(oauth): remove certificate debug statement
  • Loading branch information
jwulf authored May 3, 2024
1 parent 49e9901 commit afce0a7
Show file tree
Hide file tree
Showing 42 changed files with 19,583 additions and 381 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@ jobs:
run: |
npm run test
unit-tests-windows:
runs-on: windows-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Run Unit Tests
run: |
npm run test
local_integration:
runs-on: ubuntu-latest
environment:
Expand Down Expand Up @@ -152,3 +173,39 @@ jobs:
CAMUNDA_CONSOLE_CLIENT_SECRET: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_SECRET }}
CAMUNDA_CONSOLE_BASE_URL: ${{ secrets.CAMUNDA_CONSOLE_BASE_URL }}
CAMUNDA_CONSOLE_OAUTH_AUDIENCE: ${{ secrets.CAMUNDA_CONSOLE_OAUTH_AUDIENCE}}

saas_integration_windows:
needs: saas_integration
runs-on: windows-latest
environment: integration
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version

- name: Install dependencies
run: npm install

- name: Run Integration Tests
run: |
npm run test:integration
env:
ZEEBE_ADDRESS: ${{ secrets.ZEEBE_ADDRESS }}
ZEEBE_CLIENT_ID: ${{ secrets.ZEEBE_CLIENT_ID }}
ZEEBE_AUTHORIZATION_SERVER_URL: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}
ZEEBE_CLIENT_SECRET: ${{ secrets.ZEEBE_CLIENT_SECRET }}
ZEEBE_TOKEN_AUDIENCE: ${{ secrets.ZEEBE_TOKEN_AUDIENCE }}
CAMUNDA_CREDENTIALS_SCOPES: ${{ secrets.CAMUNDA_CREDENTIALS_SCOPES }}
CAMUNDA_OAUTH_URL: ${{ secrets.CAMUNDA_OAUTH_URL }}
CAMUNDA_TASKLIST_BASE_URL: ${{ secrets.CAMUNDA_TASKLIST_BASE_URL }}
CAMUNDA_OPERATE_BASE_URL: ${{ secrets.CAMUNDA_OPERATE_BASE_URL }}
CAMUNDA_OPTIMIZE_BASE_URL: ${{ secrets.CAMUNDA_OPTIMIZE_BASE_URL }}
CAMUNDA_MODELER_BASE_URL: https://modeler.cloud.camunda.io/api
CAMUNDA_CONSOLE_CLIENT_ID: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_ID }}
CAMUNDA_CONSOLE_CLIENT_SECRET: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_SECRET }}
CAMUNDA_CONSOLE_BASE_URL: ${{ secrets.CAMUNDA_CONSOLE_BASE_URL }}
CAMUNDA_CONSOLE_OAUTH_AUDIENCE: ${{ secrets.CAMUNDA_CONSOLE_OAUTH_AUDIENCE}}
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,46 @@ jobs:
CAMUNDA_CONSOLE_BASE_URL: ${{ secrets.CAMUNDA_CONSOLE_BASE_URL }}
CAMUNDA_CONSOLE_OAUTH_AUDIENCE: ${{ secrets.CAMUNDA_CONSOLE_OAUTH_AUDIENCE}}

saas_integration_windows:
needs: saas_integration
runs-on: windows-latest
environment: integration
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version

- name: Install dependencies
run: npm install

- name: Run Integration Tests
run: |
npm run test:integration
env:
ZEEBE_ADDRESS: ${{ secrets.ZEEBE_ADDRESS }}
ZEEBE_CLIENT_ID: ${{ secrets.ZEEBE_CLIENT_ID }}
ZEEBE_AUTHORIZATION_SERVER_URL: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}
ZEEBE_CLIENT_SECRET: ${{ secrets.ZEEBE_CLIENT_SECRET }}
ZEEBE_TOKEN_AUDIENCE: ${{ secrets.ZEEBE_TOKEN_AUDIENCE }}
CAMUNDA_CREDENTIALS_SCOPES: ${{ secrets.CAMUNDA_CREDENTIALS_SCOPES }}
CAMUNDA_OAUTH_URL: ${{ secrets.CAMUNDA_OAUTH_URL }}
CAMUNDA_TASKLIST_BASE_URL: ${{ secrets.CAMUNDA_TASKLIST_BASE_URL }}
CAMUNDA_OPERATE_BASE_URL: ${{ secrets.CAMUNDA_OPERATE_BASE_URL }}
CAMUNDA_OPTIMIZE_BASE_URL: ${{ secrets.CAMUNDA_OPTIMIZE_BASE_URL }}
CAMUNDA_MODELER_BASE_URL: https://modeler.cloud.camunda.io/api
CAMUNDA_CONSOLE_CLIENT_ID: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_ID }}
CAMUNDA_CONSOLE_CLIENT_SECRET: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_SECRET }}
CAMUNDA_CONSOLE_BASE_URL: ${{ secrets.CAMUNDA_CONSOLE_BASE_URL }}
CAMUNDA_CONSOLE_OAUTH_AUDIENCE: ${{ secrets.CAMUNDA_CONSOLE_OAUTH_AUDIENCE}}
tag-and-publish:
needs:
[
saas_integration,
saas_integration_windows,
local_multitenancy_integration,
local_integration,
unit-tests,
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,23 @@ jobs:
- name: Run Unit Tests
run: |
npm run test
unit-tests-windows:
runs-on: windows-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Run Unit Tests
run: |
npm run test
Loading

0 comments on commit afce0a7

Please sign in to comment.