From e61eb1be48ea6fcc921f54650b43f83743f53883 Mon Sep 17 00:00:00 2001 From: Alireza Eiji Date: Thu, 11 Jul 2024 16:44:07 +0330 Subject: [PATCH] add github actions --- .github/workflows/BuildTestWorkflow.yml | 31 +++++++++++++++++++++++++ Mohaymen.GiteaClient.sln | 1 + 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/BuildTestWorkflow.yml diff --git a/.github/workflows/BuildTestWorkflow.yml b/.github/workflows/BuildTestWorkflow.yml new file mode 100644 index 0000000..b0b8297 --- /dev/null +++ b/.github/workflows/BuildTestWorkflow.yml @@ -0,0 +1,31 @@ +name: build and test + +on: + push: + branches: + - master + - feature/** + +jobs: + build&Test: + + runs-on: ubuntu-latest + + steps: + - name: checkout repository + uses: actions/checkout@v4 + + - name: set up dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.7' + + - name: nuget restore + run: dotnet restore --no-cache + + - name: build + run: dotnet build --no-restore --configuration Release + + - name: run tests + run: dotnet test --no-restore --verbosity normal + \ No newline at end of file diff --git a/Mohaymen.GiteaClient.sln b/Mohaymen.GiteaClient.sln index 6fcfaee..25955d3 100644 --- a/Mohaymen.GiteaClient.sln +++ b/Mohaymen.GiteaClient.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .gitignore = .gitignore Directory.Packages.props = Directory.Packages.props + .github\workflows\BuildTestWorkflow.yml = .github\workflows\BuildTestWorkflow.yml EndProjectSection EndProject Global