Add deploy test1

This commit is contained in:
ngfrolov 2024-01-16 11:33:03 +05:00
parent 8d321a0d6f
commit 4fa8d980e2
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7
3 changed files with 55 additions and 1 deletions

View File

@ -0,0 +1,31 @@
name: deploy
run-name: ${{ gitea.actor }} is deploying
on:
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup dotnet
if: ${{ steps.cache-dotnet.outputs.cache-hit != 'true' }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Check out repository code
uses: actions/checkout@v4
- run: dotnet test AsbCloudWebApi.Tests
- run: dotnet publish AsbCloudWebApi --os linux --sc true -o ./build
- name: Deploy to Server
uses: appleboy/ssh-action@v1.0.3
with:
host: test.digitaldrilling.ru
username: asb
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 35222
script: |
cd /home/asb/AsbCloudDeployTest/
rsync -avzP --delete --exclude "backup" . ./backup

View File

@ -0,0 +1,23 @@
name: Unit tests
run-name: ${{ gitea.actor }} is testing
on:
push:
branches:
- dev
pull_request:
types: [review_requested, ready_for_review]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup dotnet
if: ${{ steps.cache-dotnet.outputs.cache-hit != 'true' }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Check out repository code
uses: actions/checkout@v4
- run: dotnet test AsbCloudWebApi.Tests

View File

@ -15,7 +15,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AsbCloudWebApi.Tests", "Asb
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SignalRTestClient", "SignalRTestClient\SignalRTestClient.csproj", "{E6B97963-4CEA-47B6-A0C8-625FFA9B7D69}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsbCloudWebApi.IntegrationTests", "AsbCloudWebApi.IntegrationTests\AsbCloudWebApi.IntegrationTests.csproj", "{2A937DFD-8E78-4204-A6B9-F3195EAA5818}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AsbCloudWebApi.IntegrationTests", "AsbCloudWebApi.IntegrationTests\AsbCloudWebApi.IntegrationTests.csproj", "{2A937DFD-8E78-4204-A6B9-F3195EAA5818}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution