Add unit tests to CI
This commit is contained in:
parent
9d70c68dbd
commit
42613d0a94
2 changed files with 21 additions and 0 deletions
|
@ -3,6 +3,23 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- 'dev'
|
- 'dev'
|
||||||
jobs:
|
jobs:
|
||||||
|
unit-tests:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
run: git clone https://iceshrimp.dev/iceshrimp/iceshrimp-rewrite.git --branch=${{ github.ref_name }} --depth=1 /iceshrimp
|
||||||
|
- name: Build the backend
|
||||||
|
run: |
|
||||||
|
cd /iceshrimp/Iceshrimp.Backend
|
||||||
|
dotnet restore
|
||||||
|
mkdir -p ./wwwroot/.vite/ && touch ./wwwroot/.vite/manifest.json
|
||||||
|
dotnet build
|
||||||
|
- name: Test the backend
|
||||||
|
run: |
|
||||||
|
cd /iceshrimp/Iceshrimp.Tests
|
||||||
|
dotnet test
|
||||||
build-and-push:
|
build-and-push:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
|
|
|
@ -28,3 +28,7 @@ jobs:
|
||||||
dotnet restore
|
dotnet restore
|
||||||
mkdir -p ./wwwroot/.vite/ && touch ./wwwroot/.vite/manifest.json
|
mkdir -p ./wwwroot/.vite/ && touch ./wwwroot/.vite/manifest.json
|
||||||
dotnet build
|
dotnet build
|
||||||
|
- name: Test the backend
|
||||||
|
run: |
|
||||||
|
cd /iceshrimp/Iceshrimp.Tests
|
||||||
|
dotnet test
|
||||||
|
|
Loading…
Add table
Reference in a new issue