Skip to content

Commit

Permalink
Finish transition of backend to using fluent validation and split up …
Browse files Browse the repository at this point in the history
…github actions
  • Loading branch information
CorruptComputer committed Sep 8, 2024
1 parent 7ab457b commit 9201abe
Show file tree
Hide file tree
Showing 71 changed files with 2,734 additions and 485 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: .NET Build & Test

on:
push:
branches:
- 'develop'
pull_request:
branches:
- '*'
workflow_dispatch:

env:
DOTNET_VERSION: '8.0.x'

jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
env:
DatabaseConfiguration__UseInMemoryDb: true
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore Tools
run: |
cd Backend/Bones.Api
dotnet tool restore
cd ../..
cd Frontend/Bones.Api.Client
dotnet tool restore
cd ../..
- name: Build
run: |
dotnet build --no-incremental
git diff --quiet || exit 1
- name: Test
run: dotnet test --no-build
44 changes: 44 additions & 0 deletions .github/workflows/publish-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Client Artifact

on:
push:
branches:
- 'develop'
pull_request:
branches:
- '*'
workflow_dispatch:

env:
DOTNET_VERSION: '8.0.x'

jobs:
client:
name: Publish Client
runs-on: ubuntu-latest
env:
DatabaseConfiguration__UseInMemoryDb: true
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore Tools
run: |
cd Frontend/Bones.Api.Client
dotnet tool restore
cd ../..
- name: Publish
run: |
dotnet publish Frontend/Bones.WebUI/Bones.WebUI.csproj --configuration Release --property PublishDir=~/publish
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: webui-wasm-client
path: ~/publish
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .NET Build & Test
name: Build Server Artifacts

on:
push:
Expand All @@ -13,8 +13,8 @@ env:
DOTNET_VERSION: '8.0.x'

jobs:
test:
name: .NET Build & Test
server:
name: Publish Client
runs-on: ubuntu-latest
env:
DatabaseConfiguration__UseInMemoryDb: true
Expand All @@ -32,31 +32,20 @@ jobs:
cd Backend/Bones.Api
dotnet tool restore
cd ../..
cd Frontend/Bones.Api.Client
dotnet tool restore
cd ../..
- name: Build
run: |
dotnet build --no-incremental
git diff --quiet || exit 1
- name: Test
run: dotnet test --no-build
- name: Publish Client and Server
run: |
dotnet publish Backend/Bones.Api/Bones.Api.csproj --configuration Release --runtime linux-x64 --self-contained true --property PublishDir=~/publish-server
dotnet publish Frontend/Bones.WebUI/Bones.WebUI.csproj --configuration Release --property PublishDir=~/publish-client
dotnet publish Backend/Bones.Api/Bones.Api.csproj --configuration Release --runtime linux-x64 --self-contained true --property PublishDir=~/publish-api
dotnet publish Backend/Bones.BackgroundService/Bones.BackgroundService.csproj --configuration Release --runtime linux-x64 --self-contained true --property PublishDir=~/publish-background-service
- name: Upload Server Build Artifact
- name: Upload API Build Artifact
uses: actions/upload-artifact@v4
with:
name: server-linux-x64
path: ~/publish-server
name: api-linux-x64
path: ~/publish-api

- name: Upload Client Build Artifact
- name: Upload Background Service Build Artifact
uses: actions/upload-artifact@v4
with:
name: client
path: ~/publish-client
name: background-service-linux-x64
path: ~/publish-background-service
Loading

0 comments on commit 9201abe

Please sign in to comment.