Skip to content

refactor: full process in instance #459

refactor: full process in instance

refactor: full process in instance #459

name: App Backend - Build and test
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review, converted_to_draft, closed]
paths:
- 'src/App/backend/**'
- 'src/Runtime/localtest/**'
- '.github/workflows/app-backend-tests.yml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build-frontend:
if: ${{ github.event_name != 'pull_request' || (github.event.action != 'closed' && !github.event.pull_request.draft) }}
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/app-build-frontend
analyze:
if: ${{ github.event_name != 'pull_request' || (github.event.action != 'closed' && !github.event.pull_request.draft) }}
needs: build-frontend
strategy:
matrix:
os:
- id: ubuntu-latest
workingDir: src/App/backend/
- id: macos-latest
workingDir: src/App/backend/
- id: windows-latest
workingDir: src\App\backend\
name: Build and test
runs-on: ${{ matrix.os.id }}
timeout-minutes: 15
env:
DOTNET_HOSTBUILDER__RELOADCONFIGONCHANGE: false
steps:
- name: Enable long paths for git on Windows
if: matrix.os.id == 'windows-latest'
run: git config --system core.longpaths true
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
global-json-file: src/App/backend/global.json
- name: Tool restore
working-directory: ${{ matrix.os.workingDir }}
run: |
dotnet tool restore
- name: Build backend
working-directory: ${{ matrix.os.workingDir }}
run: |
dotnet build solutions/All.sln -v m
- name: Download built frontend
if: matrix.os.id == 'ubuntu-latest'
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
with:
name: app-frontend-dist
path: src/App/frontend/dist
- name: Test
if: matrix.os.id != 'ubuntu-latest'
working-directory: ${{ matrix.os.workingDir }}
run: |
dotnet test solutions/All.sln -v m --no-restore --no-build --filter "Category!=Integration"
- name: Test (main tests)
if: matrix.os.id == 'ubuntu-latest'
working-directory: ${{ matrix.os.workingDir }}
run: |
dotnet test solutions/All.sln -v m --no-restore --no-build --filter "Category!=Integration"
- name: Test (integration tests)
if: matrix.os.id == 'ubuntu-latest'
working-directory: ${{ matrix.os.workingDir }}
run: |
dotnet test solutions/All.sln --no-restore --no-build --logger "console;verbosity=detailed" --filter "Category=Integration"
env:
SKIP_FRONTEND_BUILD: true