All checks were successful
Dotnet build and test / build (pull_request) Successful in 20m29s
83 lines
2.5 KiB
Makefile
83 lines
2.5 KiB
Makefile
|
|
CONFIG=Debug
|
|
FRAMEWORK=net9.0
|
|
DESTDIR=/tmp/yavsc
|
|
APP_PATH=srv/www/yavsc
|
|
APP_FULL_PATH=$(DESTDIR)/$(APP_PATH)
|
|
UNITTESTEXTRA= --long-running 8 --filter-trait Category=non-reg --filter-not-trait Speed=Slow --filter-not-trait DependsOn=Native
|
|
|
|
all:
|
|
dotnet build --nologo
|
|
|
|
clean:
|
|
dotnet clean -c $(CONFIG)
|
|
|
|
brutal_clean:
|
|
@find -name "obj" -exec rm -rf {} \;
|
|
@find -name "bin" -exec rm -rf {} \;
|
|
|
|
src/Yavsc/bin/output/wwwroot:
|
|
dotnet --project src/Yavsc.Org/Yavsc.Org.csproj publish
|
|
|
|
test:
|
|
ASPNETCORE_ENVIRONMENT=Development \
|
|
TESTINGPLATFORM_EXITCODE_IGNORE="110" \
|
|
dotnet test yavsc.sln \
|
|
-- --report-xunit \
|
|
--report-xunit-html \
|
|
--results-directory "test-reports" \
|
|
$(UNITTESTEXTRA) || EXITCODE=$$? && echo "🗱💻 Tests failed, exited with code $$EXITCODE";
|
|
|
|
test-postit:
|
|
ASPNETCORE_ENVIRONMENT=Development \
|
|
TESTINGPLATFORM_EXITCODE_IGNORE="110" \
|
|
dotnet test \
|
|
src/PostIt/PostIt.Tests/PostIt.Tests.csproj \
|
|
-- --report-xunit \
|
|
--report-xunit-html \
|
|
--results-directory "test-reports" \
|
|
--report-xunit-html-filename "postit-test-results.html" \
|
|
$(UNITTESTEXTRA) || EXITCODE=$$? && echo "🗱📱 Tests failed, exited with code $$EXITCODE";
|
|
|
|
backend-tests: Blogs-backend-test Org-backend-test Api-backend-test
|
|
Api-backend-test:
|
|
Blogs-backend-test:
|
|
Org-backend-test:
|
|
%-backend-test:
|
|
ASPNETCORE_ENVIRONMENT=Development dotnet test
|
|
src/test/Yavsc.$*.Tests/Yavsc.$*.Tests.csproj \
|
|
--report-xunit \
|
|
--report-xunit-html \
|
|
--results-directory "test-reports" \
|
|
--report-xunit-html-filename "$*-backend-test-results.html"
|
|
|
|
watch:
|
|
dotnet watch -p:Configuration=$(CONFIG) --project src/Yavsc/Yavsc.csproj
|
|
|
|
src/Yavsc.Abstract/bin/$(CONFIG)/$(FRAMEWORK)/Yavsc.Abstract.dll:
|
|
dotnet build -p:Configuration=$(CONFIG) --project src/Yavsc.Abstract/Yavsc.Abstract.csproj
|
|
|
|
src/Yavsc.Server/bin/$(CONFIG)/$(FRAMEWORK)/Yavsc.Server.dll:
|
|
dotnet build -p:Configuration=$(CONFIG) --project src/Yavsc.Server/Yavsc.Server.csproj
|
|
|
|
src/Yavsc/bin/$(CONFIG)/$(FRAMEWORK)/Yavsc.dll:
|
|
dotnet build -p:Configuration=$(CONFIG) --project src/Yavsc.Org/Yavsc.Org.csproj
|
|
|
|
$(DESTDIR):
|
|
mkdir $(DESTDIR)
|
|
|
|
install: $(DESTDIR)
|
|
dotnet publish src/Yavsc.Org/Yavsc.Org.csproj -c Release -o $(APP_FULL_PATH)
|
|
dotnet publish src/Api/Api.csproj -c Release -o $(APP_FULL_PATH)
|
|
sudo chown -R www-data:www-data $(APP_FULL_PATH)
|
|
|
|
docker-image:
|
|
docker build .
|
|
|
|
docker-build:
|
|
docker compose up --build
|
|
|
|
docker-run:
|
|
docker run -d -p 5000:5000 --name yavsc yavsc
|
|
|
|
.PHONY: test install docker-image docker-build docker-run
|