add workflow
This commit is contained in:
parent
535a59f092
commit
912bf9d0bd
4 changed files with 160 additions and 0 deletions
48
.forgejo/workflows/addin.yml
Normal file
48
.forgejo/workflows/addin.yml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Add-in CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- 'addin/**'
|
||||
- 'docker-compose.yml'
|
||||
- '.forgejo/workflows/addin.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'addin/**'
|
||||
- 'docker-compose.yml'
|
||||
- '.forgejo/workflows/addin.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
name: Build and test Word add-in
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
defaults:
|
||||
run:
|
||||
working-directory: addin
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --no-fund --no-audit
|
||||
|
||||
- name: Run tests
|
||||
run: npm test -- --runInBand
|
||||
|
||||
- name: Validate manifest
|
||||
run: npm run validate
|
||||
|
||||
- name: Build add-in
|
||||
run: npm run build
|
||||
50
.forgejo/workflows/backend.yml
Normal file
50
.forgejo/workflows/backend.yml
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
name: Deploy DocEdit Backend CI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "backend-*.*.*"
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# Container Registry
|
||||
REGISTRY_URL: ${{ vars.CONTAINER_REGISTRY }}
|
||||
REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
|
||||
|
||||
# Docker Image
|
||||
WEB_IMAGE_NAME: chamomind/ecourt-note
|
||||
IMAGE_TAG: ${{ github.ref_name }}
|
||||
|
||||
# SSH Deployment
|
||||
DEPLOY_HOST: ${{ vars.SSH_DEPLOY_HOST }}
|
||||
DEPLOY_USER: ${{ vars.SSH_DEPLOY_USER }}
|
||||
|
||||
# Notifications
|
||||
DISCORD_WEBHOOK_URL: ${{ vars.DISCORD_WEBHOOK_URL }}
|
||||
NEXT_PUBLIC_APP_URL: ${{ vars.NEXT_PUBLIC_APP_URL }}
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
name: Build and test backend
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: '1'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Restore solution
|
||||
run: dotnet restore backend/WordVersioning.slnx
|
||||
|
||||
- name: Build solution
|
||||
run: dotnet build backend/WordVersioning.slnx --configuration Release --no-restore
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test backend/WordVersioning.slnx --configuration Release --no-build --logger "trx;LogFileName=backend-tests.trx"
|
||||
45
.forgejo/workflows/web.yml
Normal file
45
.forgejo/workflows/web.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Web CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- 'web/**'
|
||||
- 'docker-compose.yml'
|
||||
- '.forgejo/workflows/web.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'web/**'
|
||||
- 'docker-compose.yml'
|
||||
- '.forgejo/workflows/web.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
name: Build and test web app
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
defaults:
|
||||
run:
|
||||
working-directory: web
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --no-fund --no-audit
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test
|
||||
|
||||
- name: Build app
|
||||
run: npm run build
|
||||
Loading…
Add table
Add a link
Reference in a new issue