Skip to content

ci(repo): add dispatch workflow to actions #63

ci(repo): add dispatch workflow to actions

ci(repo): add dispatch workflow to actions #63

Workflow file for this run

name: Publish a new version
on:
workflow_dispatch:
push:
branches:
- main
- alpha
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20" # Specify a Node.js version
- name: Install dependencies
run: npm i
- name: Build and Smoke Test
run: npm run test:smoketest
- name: Run Unit Tests
run: |
npm run test
local_integration:
runs-on: ubuntu-latest
environment:
name: selfhosted
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20" # Specify a Node.js version
- name: Install dependencies
run: npm install
# Workaround for https://github.com/actions/runner-images/issues/2821
- name: Remove mono blocking 8084 port
run: sudo kill -9 $(sudo lsof -t -i:8084)
- name: Set up Docker
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username joshua.wulf --password-stdin registry.camunda.cloud
- name: Set up Docker Compose
run: |
docker-compose -f docker/docker-compose.yaml -f docker/docker-compose-modeler.yaml up -d
- name: Run Integration Tests
run: |
npm run test:local-integration
env:
CAMUNDA_SECURE_CONNECTION: false
ZEEBE_ADDRESS: localhost:26500
ZEEBE_CLIENT_ID: zeebe
ZEEBE_CLIENT_SECRET: zecret
CAMUNDA_OAUTH_URL: http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token
CAMUNDA_TASKLIST_BASE_URL: http://localhost:8082
CAMUNDA_OPERATE_BASE_URL: http://localhost:8081
CAMUNDA_OPTIMIZE_BASE_URL: http://localhost:8083
CAMUNDA_MODELER_BASE_URL: http://localhost:8070/api
- name: Cleanup
if: always()
run: docker-compose -f docker/docker-compose.yaml -f docker/docker-compose-modeler.yaml down
local_multitenancy_integration:
runs-on: ubuntu-latest
environment:
name: selfhosted
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20" # Specify a Node.js version
- name: Install dependencies
run: npm install
# Workaround for https://github.com/actions/runner-images/issues/2821
- name: Remove mono blocking 8084 port
run: sudo kill -9 $(sudo lsof -t -i:8084)
- name: Set up Docker
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username joshua.wulf --password-stdin registry.camunda.cloud
- name: Set up Docker Compose
run: |
docker-compose -f docker/docker-compose-multitenancy.yaml -f docker/docker-compose-modeler.yaml up -d
- name: Run Integration Tests
run: |
npm run test:multitenancy
env:
CAMUNDA_SECURE_CONNECTION: false
ZEEBE_ADDRESS: localhost:26500
ZEEBE_CLIENT_ID: zeebe
ZEEBE_CLIENT_SECRET: zecret
CAMUNDA_OAUTH_URL: http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token
CAMUNDA_TASKLIST_BASE_URL: http://localhost:8082
CAMUNDA_OPERATE_BASE_URL: http://localhost:8081
CAMUNDA_OPTIMIZE_BASE_URL: http://localhost:8083
CAMUNDA_MODELER_BASE_URL: http://localhost:8070/api
# Needed for Multi-Tenancy
CAMUNDA_TENANT_ID: <default>
- name: Cleanup
if: always()
run: docker-compose -f docker/docker-compose-multitenancy.yaml -f docker/docker-compose-modeler.yaml down
saas_integration:
runs-on: ubuntu-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: "20" # 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_REST_ADDRESS: ${{ secrets.ZEEBE_REST_ADDRESS }}
ZEEBE_GRPC_ADDRESS: ${{ secrets.ZEEBE_GRPC_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}}
# saas_integration_windows:
# needs: saas_integration
# runs-on: windows-2019
# environment: integration
# steps:
# - name: Check out the repo
# uses: actions/checkout@v4
# - name: Use Node.js
# uses: actions/setup-node@v4
# with:
# node-version: "20" # 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_REST_ADDRESS: ${{ secrets.ZEEBE_REST_ADDRESS }}
# ZEEBE_GRPC_ADDRESS: ${{ secrets.ZEEBE_GRPC_ADDRESS }}
# 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,
]
runs-on: ubuntu-latest
environment:
name: publish
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install
run: npm i
- name: Build
run: npm run build
- name: Build Docs
run: npm run docs
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
- name: Deploy Docs
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
branch: gh-pages