From 2e936bc58dd68ce2ed7201ced06d05e67f4887a8 Mon Sep 17 00:00:00 2001 From: Sander Bruens Date: Thu, 4 Apr 2024 17:59:27 +0100 Subject: [PATCH] ci: split the workflows for the 3 components in this repo --- .github/workflows/build_and_test_debug.yml | 119 ------------------ .../build_and_test_metrics_server.yml | 41 ++++++ .../build_and_test_sentry_webhook.yml | 41 ++++++ .../workflows/build_and_test_shadowbox.yml | 57 +++++++++ .github/workflows/lint.yml | 34 +++++ 5 files changed, 173 insertions(+), 119 deletions(-) delete mode 100644 .github/workflows/build_and_test_debug.yml create mode 100644 .github/workflows/build_and_test_metrics_server.yml create mode 100644 .github/workflows/build_and_test_sentry_webhook.yml create mode 100644 .github/workflows/build_and_test_shadowbox.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/build_and_test_debug.yml b/.github/workflows/build_and_test_debug.yml deleted file mode 100644 index 261d0627..00000000 --- a/.github/workflows/build_and_test_debug.yml +++ /dev/null @@ -1,119 +0,0 @@ -name: Build and Test - -concurrency: - group: ${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - pull_request: - types: - - opened - - synchronize - push: - branches: - - master - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2.3.4 - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - - name: Install NPM Dependencies - run: npm ci - - - name: Lint - run: npm run lint - - shadowbox: - name: Shadowbox - runs-on: ubuntu-latest - needs: lint - steps: - - name: Checkout - uses: actions/checkout@v2.3.4 - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - - name: Install NPM Dependencies - run: npm ci - - - name: Shadowbox Debug Build - run: npm run action shadowbox/server/build - - - name: Shadowbox Unit Test - run: npm run action shadowbox/test - - - name: Shadowbox Integration Test - run: npm run action shadowbox/integration_test/run - - manual-install-script: - name: Manual Install Script - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2.3.4 - - - name: Install Outline Server - run: ./src/server_manager/install_scripts/install_server.sh --hostname localhost - - - name: Test API - run: 'curl --silent --fail --insecure $(grep "apiUrl" /opt/outline/access.txt | cut -d: -f 2-)/server' - - metrics-server: - name: Metrics Server - runs-on: ubuntu-latest - needs: lint - steps: - - name: Checkout - uses: actions/checkout@v2.3.4 - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - - name: Install NPM Dependencies - run: npm ci - - - name: Metrics Server Debug Build - run: npm run action metrics_server/build - - - name: Metrics Server Test - run: npm run action metrics_server/test - - sentry-webhook: - name: Sentry Webhook - runs-on: ubuntu-latest - needs: lint - steps: - - name: Checkout - uses: actions/checkout@v2.3.4 - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: npm - - - name: Install NPM Dependencies - run: npm ci - - - name: Sentry Webhook Debug Build - run: npm run action sentry_webhook/build - - - name: Sentry Webhook Test - run: npm run action sentry_webhook/test diff --git a/.github/workflows/build_and_test_metrics_server.yml b/.github/workflows/build_and_test_metrics_server.yml new file mode 100644 index 00000000..b6b0291c --- /dev/null +++ b/.github/workflows/build_and_test_metrics_server.yml @@ -0,0 +1,41 @@ +name: Build and Test + +concurrency: + group: ${{ github.head_ref || github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: + - opened + - synchronize + paths: + - 'src/metrics_server/**' + push: + branches: + - master + paths: + - 'src/metrics_server/**' + +jobs: + metrics-server: + name: Metrics Server + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + + - name: Install NPM Dependencies + run: npm ci + + - name: Metrics Server Debug Build + run: npm run action metrics_server/build + + - name: Metrics Server Test + run: npm run action metrics_server/test diff --git a/.github/workflows/build_and_test_sentry_webhook.yml b/.github/workflows/build_and_test_sentry_webhook.yml new file mode 100644 index 00000000..87eba904 --- /dev/null +++ b/.github/workflows/build_and_test_sentry_webhook.yml @@ -0,0 +1,41 @@ +name: Build and Test - Sentry Webhook + +concurrency: + group: ${{ github.head_ref || github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: + - opened + - synchronize + paths: + - 'src/sentry_webhook/**' + push: + branches: + - master + paths: + - 'src/sentry_webhook/**' + +jobs: + sentry-webhook: + name: Sentry Webhook + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + + - name: Install NPM Dependencies + run: npm ci + + - name: Sentry Webhook Debug Build + run: npm run action sentry_webhook/build + + - name: Sentry Webhook Test + run: npm run action sentry_webhook/test diff --git a/.github/workflows/build_and_test_shadowbox.yml b/.github/workflows/build_and_test_shadowbox.yml new file mode 100644 index 00000000..50d21b59 --- /dev/null +++ b/.github/workflows/build_and_test_shadowbox.yml @@ -0,0 +1,57 @@ +name: Build and Test - Shadowbox + +concurrency: + group: ${{ github.head_ref || github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: + - opened + - synchronize + paths: + - 'src/shadowbox/**' + push: + branches: + - master + paths: + - 'src/shadowbox/**' + +jobs: + shadowbox: + name: Shadowbox + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + + - name: Install NPM Dependencies + run: npm ci + + - name: Shadowbox Debug Build + run: npm run action shadowbox/server/build + + - name: Shadowbox Unit Test + run: npm run action shadowbox/test + + - name: Shadowbox Integration Test + run: npm run action shadowbox/integration_test/run + + manual-install-script: + name: Manual Install Script + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + + - name: Install Outline Server + run: ./src/server_manager/install_scripts/install_server.sh --hostname localhost + + - name: Test API + run: 'curl --silent --fail --insecure $(grep "apiUrl" /opt/outline/access.txt | cut -d: -f 2-)/server' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..675ecba4 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Lint + +concurrency: + group: ${{ github.head_ref || github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: + - opened + - synchronize + push: + branches: + - master + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + + - name: Install NPM Dependencies + run: npm ci + + - name: Lint + run: npm run lint