ci: split the workflows for the 3 components in this repo

This commit is contained in:
Sander Bruens 2024-04-04 17:59:27 +01:00
parent d0d9077a9a
commit 2e936bc58d
5 changed files with 173 additions and 119 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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'

34
.github/workflows/lint.yml vendored Normal file
View file

@ -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