Skip to content

Commit

Permalink
add fw lite workflow to output builds and run tests. Exclude fw lite …
Browse files Browse the repository at this point in the history
…stuff from lexbox-api.yaml workflow and don't run fw lite tests as part of lexbox.
  • Loading branch information
hahn-kev committed Jun 7, 2024
1 parent 878cf35 commit 9095361
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 8 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/develop-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ name: Develop API CI/CD
on:
workflow_dispatch:
push:
paths:
- 'backend/**'
paths: &paths
- 'backend/LexBoxApi/**'
- 'backend/LexCore/**'
- 'backend/LexData/**'
- 'backend/LfClassicData/**'
- 'backend/MiniLcm/**'
- 'backend/SyncReverserProxy/**'
- 'backend/Testing/**'
- '.github/workflows/lexbox-api.yaml'
- '.github/workflows/deploy.yaml'
- 'deployment/lexbox-deployment.yaml'
branches:
- develop
pull_request:
paths:
- 'backend/**'
- '.github/workflows/lexbox-api.yaml'
- '.github/workflows/deploy.yaml'
- 'deployment/lexbox-deployment.yaml'
paths: *paths
branches:
- develop

Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/fw-lite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: FieldWorks Lite
on:
workflow_dispatch:
push:
paths: &paths
- 'backend/FwDataMiniLcmBridge/**'
- 'backend/harmony/**'
- 'backend/LcmCrdt/**'
- 'backend/LocalWebApp/**'
- 'backend/MiniLcm/**'
- 'frontend/viewer/**'
- '.github/workflows/fw-lite.yaml'
branches:
- develop
pull_request:
paths: *paths
branches:
- develop

jobs:
build-app:
name: Build FW Lite
timeout-minutes: 20
runs-on: unutbu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- uses: actions/setup-node@v4
with:
node-version-file: './frontend/package.json'
- name: Dotnet build
working-directory: backend/LocalWebApp
run: dotnet build --configuration Release
- name: Dotnet test
working-directory: backend/LcmCrdt.Tests
run: dotnet test --configuration Release --logger:"xunit;LogFileName={assembly}.results.xml" --results-directory ./test-results
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@8885e273a4343cd7b48eaa72428dea0c3067ea98 # v2.14.0
if: always()
with:
check_name: FW Lite Unit Tests
files: ./backend/LcmCrdt.Tests/test-results/*.xml
- name: Build viewer
working-directory: frontend/viewer
run: |
corepack enable
pnpm install
pnpm run build-app
- name: Publish linux
working-directory: backend/LocalWebApp
run: dotnet publish -r linux-x64 -o ./publish/linux
- name: Publish osx
working-directory: backend/LocalWebApp
run: dotnet publish -r osx-x64 -o ./publish/osx
- name: Publish win
working-directory: backend/LocalWebApp
run: dotnet publish -r win-x64 -o ./publish/win
- name: Upload artifacts
# uploading in one artifact as there's a lot of duplication between builds so compression goes far
uses: actions/upload-artifact@v4
with:
name: fw-lite
if-no-files-found: error
path: backend/LocalWebApp/publish/*
3 changes: 2 additions & 1 deletion .github/workflows/lexbox-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ jobs:
- name: Dotnet build
run: dotnet build
- name: Unit tests
working-directory: backend/Testing
run: dotnet test --logger:"xunit;LogFileName={assembly}.results.xml" --results-directory ./test-results --filter "Category!=Integration" --blame-hang-timeout 10m
- name: Publish unit test results
uses: EnricoMi/publish-unit-test-result-action@8885e273a4343cd7b48eaa72428dea0c3067ea98 # v2.14.0
if: always()
with:
check_name: C# Unit Tests
files: ./test-results/*.xml
files: ./backend/Testing/test-results/*.xml
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
Expand Down
4 changes: 4 additions & 0 deletions frontend/viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "viewer",
"private": true,
"packageManager": "pnpm@8.15.1",
"engines": {
"node": ">=20"
},
"version": "1.0.0",
"type": "module",
"main": "dist-web-component/viewer.js",
Expand Down

0 comments on commit 9095361

Please sign in to comment.