Files
aliasvault/.github/workflows/dotnet-unit-tests.yml

48 lines
1.1 KiB
YAML

# This workflow will test if running the unit tests works.
name: Unit Tests
on:
push:
branches: [ "main" ]
paths:
- 'apps/server/**'
- 'core/**'
- '.github/workflows/dotnet-unit-tests.yml'
pull_request:
branches: [ "main" ]
paths:
- 'apps/server/**'
- 'core/**'
- '.github/workflows/dotnet-unit-tests.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install dependencies
working-directory: apps/server
run: dotnet workload install wasm-tools
- name: Restore dependencies
working-directory: apps/server
run: dotnet restore
- name: Build
working-directory: apps/server
run: dotnet build --no-restore
- name: Run unittests
working-directory: apps/server
run: dotnet test Tests/AliasVault.UnitTests --no-build --verbosity normal