From 400ea236b87ef83b46442e5b844581a9052ff9cf Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Tue, 8 Oct 2024 19:04:13 +0400 Subject: [PATCH 01/29] add pr verify workflow --- .../.github/workflows/pr-verify.yml | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 src/GitHubActionsDotNet.Api/.github/workflows/pr-verify.yml diff --git a/src/GitHubActionsDotNet.Api/.github/workflows/pr-verify.yml b/src/GitHubActionsDotNet.Api/.github/workflows/pr-verify.yml new file mode 100644 index 00000000..a2c2681a --- /dev/null +++ b/src/GitHubActionsDotNet.Api/.github/workflows/pr-verify.yml @@ -0,0 +1,91 @@ +# This workflow will build and push a .NET Core app to an Azure Web App when a commit is pushed to your default branch. +# +# This workflow assumes you have already created the target Azure App Service web app. +# For instructions see https://docs.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore?tabs=net60&pivots=development-environment-vscode +# +# To configure this workflow: +# +# 1. Download the Publish Profile for your Azure Web App. You can download this file from the Overview page of your Web App in the Azure Portal. +# For more information: https://docs.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=applevel#generate-deployment-credentials +# +# 2. Create a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE, paste the publish profile contents as the value of the secret. +# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret +# +# 3. Change the value for the AZURE_WEBAPP_NAME. Optionally, change the AZURE_WEBAPP_PACKAGE_PATH and DOTNET_VERSION environment variables below. +# +# For more information on GitHub Actions for Azure: https://github.com/Azure/Actions +# For more information on the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# For more samples to get started with GitHub Action workflows to deploy to Azure: https://github.com/Azure/actions-workflow-samples + +name: PR Verify + +env: +# AZURE_WEBAPP_NAME: your-app-name # set this to the name of your Azure Web App +# AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root + DOTNET_VERSION: '8.0' # set this to the .NET Core version to use + +on: +# push: + pull_request: + branches: [ "main" ] +# workflow_dispatch: + +#permissions: +# contents: read + +jobs: + build: + name: PR Verify + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + +# - name: Set up dependency caching for faster builds +# uses: actions/cache@v3 +# with: +# path: ~/.nuget/packages +# key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} +# restore-keys: | +# ${{ runner.os }}-nuget- + + - name: Build with dotnet + run: dotnet build --configuration Release + +# - name: dotnet publish +# run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp +# +# - name: Upload artifact for deployment job +# uses: actions/upload-artifact@v3 +# with: +# name: .net-app +# path: ${{env.DOTNET_ROOT}}/myapp +# +# deploy: +# permissions: +# contents: none +# runs-on: ubuntu-latest +# needs: build +# environment: +# name: 'Development' +# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} +# +# steps: +# - name: Download artifact from build job +# uses: actions/download-artifact@v3 +# with: +# name: .net-app +# +# - name: Deploy to Azure Web App +# id: deploy-to-webapp +# uses: azure/webapps-deploy@v2 +# with: +# app-name: ${{ env.AZURE_WEBAPP_NAME }} +# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} +# package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} +# \ No newline at end of file From 9186dfeefb76c2095c85a97f4103f33bf9581f48 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Tue, 8 Oct 2024 19:19:29 +0400 Subject: [PATCH 02/29] add new line to weather forcast (#1) --- src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 786b4a10..efe721f3 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -10,3 +10,4 @@ public record WeatherForecast public string? Summary { get; init; } } + From 5a8278a7f7888aa5f44eaf2d9652c168a203f031 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Tue, 8 Oct 2024 19:57:17 +0400 Subject: [PATCH 03/29] fixed bug in file hierarchy configuration --- .../.github => .github}/workflows/pr-verify.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {src/GitHubActionsDotNet.Api/.github => .github}/workflows/pr-verify.yml (100%) diff --git a/src/GitHubActionsDotNet.Api/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml similarity index 100% rename from src/GitHubActionsDotNet.Api/.github/workflows/pr-verify.yml rename to .github/workflows/pr-verify.yml From 1f933ae4a3d6cc01cfb1db9e0176f71c9bc30f34 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Wed, 9 Oct 2024 23:20:39 +0400 Subject: [PATCH 04/29] added new feature (#2) --- src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index efe721f3..0d73875b 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -9,5 +9,7 @@ public record WeatherForecast public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); public string? Summary { get; init; } + + public string? Observatory {get; init; } } From 6e556d41c1e60cb4c787663b4407dfcbaec6ff95 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Wed, 9 Oct 2024 23:25:44 +0400 Subject: [PATCH 05/29] add new line to weather forcast (#3) From 99a8f077225500256815158c8a883a4fcb10a549 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Thu, 10 Oct 2024 22:53:44 +0400 Subject: [PATCH 06/29] Add tests check (#4) * added tests to the workflow * changed tests * changed tests again --- .github/workflows/pr-verify.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index a2c2681a..c2db34a1 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -57,6 +57,9 @@ jobs: - name: Build with dotnet run: dotnet build --configuration Release + - name: dotnet test + run: dotnet test --configuration Release --no-build + # - name: dotnet publish # run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp # From bc985eddba1012843a052e1c99e6628014259471 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 00:32:18 +0400 Subject: [PATCH 07/29] Ci (#9) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * add CI (update 2) --- .github/workflows/ci.yml | 30 ++++++++ .github/workflows/pr-verify.yml | 68 +------------------ .../Models/WeatherForecast.cs | 5 +- 3 files changed, 34 insertions(+), 69 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..b64a7472 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +env: + DOTNET_VERSION: '8.0' # set this to the .NET Core version to use + +on: + push: + branches: [ "main" ] + +jobs: + build: + name: CI + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build with dotnet + run: dotnet build --configuration Release + + - name: dotnet test + run: dotnet test --configuration Release --no-build + + - name: dotnet publish + run: dotnet publish src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj --configuration Release -o artifacts diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index c2db34a1..804aedcf 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -1,37 +1,11 @@ -# This workflow will build and push a .NET Core app to an Azure Web App when a commit is pushed to your default branch. -# -# This workflow assumes you have already created the target Azure App Service web app. -# For instructions see https://docs.microsoft.com/en-us/azure/app-service/quickstart-dotnetcore?tabs=net60&pivots=development-environment-vscode -# -# To configure this workflow: -# -# 1. Download the Publish Profile for your Azure Web App. You can download this file from the Overview page of your Web App in the Azure Portal. -# For more information: https://docs.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=applevel#generate-deployment-credentials -# -# 2. Create a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE, paste the publish profile contents as the value of the secret. -# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret -# -# 3. Change the value for the AZURE_WEBAPP_NAME. Optionally, change the AZURE_WEBAPP_PACKAGE_PATH and DOTNET_VERSION environment variables below. -# -# For more information on GitHub Actions for Azure: https://github.com/Azure/Actions -# For more information on the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy -# For more samples to get started with GitHub Action workflows to deploy to Azure: https://github.com/Azure/actions-workflow-samples - name: PR Verify env: -# AZURE_WEBAPP_NAME: your-app-name # set this to the name of your Azure Web App -# AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root DOTNET_VERSION: '8.0' # set this to the .NET Core version to use on: -# push: pull_request: branches: [ "main" ] -# workflow_dispatch: - -#permissions: -# contents: read jobs: build: @@ -46,49 +20,11 @@ jobs: with: dotnet-version: ${{ env.DOTNET_VERSION }} -# - name: Set up dependency caching for faster builds -# uses: actions/cache@v3 -# with: -# path: ~/.nuget/packages -# key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} -# restore-keys: | -# ${{ runner.os }}-nuget- - - name: Build with dotnet run: dotnet build --configuration Release - name: dotnet test run: dotnet test --configuration Release --no-build -# - name: dotnet publish -# run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp -# -# - name: Upload artifact for deployment job -# uses: actions/upload-artifact@v3 -# with: -# name: .net-app -# path: ${{env.DOTNET_ROOT}}/myapp -# -# deploy: -# permissions: -# contents: none -# runs-on: ubuntu-latest -# needs: build -# environment: -# name: 'Development' -# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} -# -# steps: -# - name: Download artifact from build job -# uses: actions/download-artifact@v3 -# with: -# name: .net-app -# -# - name: Deploy to Azure Web App -# id: deploy-to-webapp -# uses: azure/webapps-deploy@v2 -# with: -# app-name: ${{ env.AZURE_WEBAPP_NAME }} -# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} -# package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} -# \ No newline at end of file + - name: dotnet format + run: dotnet format -v detailed --verify-no-changes diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 0d73875b..93a515b6 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -9,7 +9,6 @@ public record WeatherForecast public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); public string? Summary { get; init; } - - public string? Observatory {get; init; } -} + public string? Observatory { get; init; } +} From 0bac3d9701c41c104be19602a7061c2e6800603b Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 00:35:50 +0400 Subject: [PATCH 08/29] Formatting (#5) * added tests to the workflow * changed tests * changed tests again * added format and codeql From 959effdcdeecea7ccc5d3eebf8ccb2d6573e3a8a Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 00:38:23 +0400 Subject: [PATCH 09/29] Add tests check (#6) * added tests to the workflow * changed tests * changed tests again From 146ed2b724dd78eb314b21fa00cf65afeec85587 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 00:42:52 +0400 Subject: [PATCH 10/29] Ci (#10) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * add CI (update 2) From b17153018bb88291671d2bc217af6d00ca0202ee Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 01:19:16 +0400 Subject: [PATCH 11/29] Ci upload (#11) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * upload artifacts as part of the CI * upload artifacts as part of the CI (1) --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b64a7472..ea21651f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,3 +28,9 @@ jobs: - name: dotnet publish run: dotnet publish src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj --configuration Release -o artifacts + + - uses: actions/upload-artifact@v4 + with: + name: dometrain-artifact + path: artifacts/ # or path/to/artifact + \ No newline at end of file From cd309cd2f98fb61ae92cfeb12b354b77cd1bee4a Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 17:25:01 +0400 Subject: [PATCH 12/29] My hero (#12) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * meramdened From 87fa37bb2eeb575901896b93af294ed597501cff Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 17:32:35 +0400 Subject: [PATCH 13/29] Add tests check (#13) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * www From 43fab7cba526bfaab52d49a70ea4f245f68fc840 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 17:51:03 +0400 Subject: [PATCH 14/29] Update WeatherForecast.cs (#14) From 30a3ac13708a958c23a92a14b454ed664e101c0f Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Mon, 14 Oct 2024 18:30:02 +0400 Subject: [PATCH 15/29] Cron (#15) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * add cron job 1 --- .github/workflows/cron.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/cron.yml diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml new file mode 100644 index 00000000..6a4c2f84 --- /dev/null +++ b/.github/workflows/cron.yml @@ -0,0 +1,17 @@ +name: Run every 5 minutes + +env: + DOTNET_VERSION: '8.0' # set this to the .NET Core version to use + +on: + schedule: + - cron: "*/5 * * * *" + +jobs: + cron: + name: Run every 5 minutes + runs-on: ubuntu-latest + + steps: + - name: Hello world + run: echo "Hello World" From 667dcc13d78be5fb661abedac121b2071cc5df87 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Mon, 14 Oct 2024 18:44:47 +0400 Subject: [PATCH 16/29] Update cron.yml (#16) --- .github/workflows/cron.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 6a4c2f84..780164a7 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -1,15 +1,15 @@ -name: Run every 5 minutes +name: Run every 1 hour env: DOTNET_VERSION: '8.0' # set this to the .NET Core version to use on: schedule: - - cron: "*/5 * * * *" + - cron: "0 * * * *" jobs: cron: - name: Run every 5 minutes + name: Run every 1 hour runs-on: ubuntu-latest steps: From db0cc4d8de8e6f1b1f03823d2fdeeabdcc1d9d4d Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Mon, 14 Oct 2024 23:15:42 +0400 Subject: [PATCH 17/29] Secrets (#17) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * add secrets * added secrets --- .github/workflows/pr-verify.yml | 4 ++-- .github/workflows/secrets.yml | 18 ++++++++++++++++++ .../Models/WeatherForecast.cs | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/secrets.yml diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index 804aedcf..7c683c59 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -26,5 +26,5 @@ jobs: - name: dotnet test run: dotnet test --configuration Release --no-build - - name: dotnet format - run: dotnet format -v detailed --verify-no-changes +# - name: dotnet format +# run: dotnet format -v detailed --verify-no-changes diff --git a/.github/workflows/secrets.yml b/.github/workflows/secrets.yml new file mode 100644 index 00000000..fc045a2f --- /dev/null +++ b/.github/workflows/secrets.yml @@ -0,0 +1,18 @@ +name: Secrets workflow + +env: + DOTNET_VERSION: '8.0' # set this to the .NET Core version to use + API_CSPROJ_PATH: "./src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj" + +on: + pull_request: + branches: [ "main" ] + +jobs: + secrets: + name: Secrets Demo + runs-on: ubuntu-latest + + steps: + - name: echo environment variable + run: echo "$API_CSPROJ_PATH" diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 93a515b6..40f16094 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -10,5 +10,5 @@ public record WeatherForecast public string? Summary { get; init; } - public string? Observatory { get; init; } + public string? Observatory { get; init; } } From bc770bd36df8e58020e739d945d9e153092385ee Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Mon, 14 Oct 2024 23:43:30 +0400 Subject: [PATCH 18/29] Secrets (#18) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * add secrets * added secrets * added secrets * add secrets --- .github/workflows/secrets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/secrets.yml b/.github/workflows/secrets.yml index fc045a2f..6e3fa543 100644 --- a/.github/workflows/secrets.yml +++ b/.github/workflows/secrets.yml @@ -15,4 +15,4 @@ jobs: steps: - name: echo environment variable - run: echo "$API_CSPROJ_PATH" + run: echo "The value of SECRET_API_KEY is $${{secrets.SECRET_API_KEY}}" From e127475aa257149686bb93b8d69b5c967ae0a12e Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Thu, 17 Oct 2024 21:08:19 +0400 Subject: [PATCH 19/29] Secrets (#19) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * add secrets * added secrets * added secrets * add secrets --- src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 40f16094..93a515b6 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -10,5 +10,5 @@ public record WeatherForecast public string? Summary { get; init; } - public string? Observatory { get; init; } + public string? Observatory { get; init; } } From 9e538dcf6bc526fc3f58beb0227b4a672c8e1535 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Wed, 9 Oct 2024 23:49:14 +0400 Subject: [PATCH 20/29] added tests to the workflow --- .github/workflows/pr-verify.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index 7c683c59..f56358a5 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -26,5 +26,40 @@ jobs: - name: dotnet test run: dotnet test --configuration Release --no-build +<<<<<<< HEAD # - name: dotnet format # run: dotnet format -v detailed --verify-no-changes +======= +# - name: dotnet publish +# run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp +# +# - name: Upload artifact for deployment job +# uses: actions/upload-artifact@v3 +# with: +# name: .net-app +# path: ${{env.DOTNET_ROOT}}/myapp +# +# deploy: +# permissions: +# contents: none +# runs-on: ubuntu-latest +# needs: build +# environment: +# name: 'Development' +# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} +# +# steps: +# - name: Download artifact from build job +# uses: actions/download-artifact@v3 +# with: +# name: .net-app +# +# - name: Deploy to Azure Web App +# id: deploy-to-webapp +# uses: azure/webapps-deploy@v2 +# with: +# app-name: ${{ env.AZURE_WEBAPP_NAME }} +# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} +# package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} +# +>>>>>>> 14cae1a (added tests to the workflow) From ed9c6ab1dc46f0557c2e6401c69e77c44844abb2 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Thu, 10 Oct 2024 22:47:09 +0400 Subject: [PATCH 21/29] changed tests --- .../Models/WeatherForecastTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs index f03d0f47..32811ed6 100644 --- a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs +++ b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs @@ -12,6 +12,6 @@ public void TemperatureFShouldReturnCorrectValueBasedOnTemperatureC() TemperatureC = 0 }; - weatherForecast.TemperatureF.Should().Be(32); + weatherForecast.TemperatureF.Should().Be(31); } } From 1a4409e78cc3ba39cdefe94aab4ba7113be1dbf6 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Thu, 10 Oct 2024 22:49:43 +0400 Subject: [PATCH 22/29] changed tests again --- .../Models/WeatherForecastTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs index 32811ed6..f03d0f47 100644 --- a/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs +++ b/src/GitHubActionsDotNet.Api.Tests/Models/WeatherForecastTests.cs @@ -12,6 +12,6 @@ public void TemperatureFShouldReturnCorrectValueBasedOnTemperatureC() TemperatureC = 0 }; - weatherForecast.TemperatureF.Should().Be(31); + weatherForecast.TemperatureF.Should().Be(32); } } From 14f8d83d86e96912a7e8ea61421e3bbdeba257d5 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 00:07:26 +0400 Subject: [PATCH 23/29] add CI --- .github/workflows/ci.yml | 5 ++++- .github/workflows/pr-verify.yml | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea21651f..3a1b8ca6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,9 +28,12 @@ jobs: - name: dotnet publish run: dotnet publish src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj --configuration Release -o artifacts +<<<<<<< HEAD - uses: actions/upload-artifact@v4 with: name: dometrain-artifact path: artifacts/ # or path/to/artifact - \ No newline at end of file + +======= +>>>>>>> 15b6749 (add CI) diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index f56358a5..8f642df6 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -26,6 +26,7 @@ jobs: - name: dotnet test run: dotnet test --configuration Release --no-build +<<<<<<< HEAD <<<<<<< HEAD # - name: dotnet format # run: dotnet format -v detailed --verify-no-changes @@ -63,3 +64,7 @@ jobs: # package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} # >>>>>>> 14cae1a (added tests to the workflow) +======= + - name: dotnet format + run: dotnet format -v detailed --verify-no-changes +>>>>>>> 15b6749 (add CI) From a8c7df7b42ae4c1a4641e02580d684b6d6a3bbf1 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Sun, 13 Oct 2024 00:17:49 +0400 Subject: [PATCH 24/29] add CI (update) --- src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 93a515b6..f981eff1 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -10,5 +10,9 @@ public record WeatherForecast public string? Summary { get; init; } +<<<<<<< HEAD public string? Observatory { get; init; } +======= + public string? Observatory { get; init; } +>>>>>>> 2bc5d15 (add CI (update)) } From aa6f3a38cbd07c0657064a06b8bf1055e81c2481 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Thu, 17 Oct 2024 23:22:12 +0400 Subject: [PATCH 25/29] Help (#20) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) From ba56ff4019934c056d471702810ce5468fecf5a5 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Thu, 17 Oct 2024 23:53:20 +0400 Subject: [PATCH 26/29] New (#22) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) * update * update --- .github/workflows/ci.yml | 3 +-- .github/workflows/pr-verify.yml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea21651f..2b7542a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,5 +32,4 @@ jobs: - uses: actions/upload-artifact@v4 with: name: dometrain-artifact - path: artifacts/ # or path/to/artifact - \ No newline at end of file + path: artifacts/ diff --git a/.github/workflows/pr-verify.yml b/.github/workflows/pr-verify.yml index 7c683c59..804aedcf 100644 --- a/.github/workflows/pr-verify.yml +++ b/.github/workflows/pr-verify.yml @@ -26,5 +26,5 @@ jobs: - name: dotnet test run: dotnet test --configuration Release --no-build -# - name: dotnet format -# run: dotnet format -v detailed --verify-no-changes + - name: dotnet format + run: dotnet format -v detailed --verify-no-changes From 1224f3a5df84e9ebdb1b26bc8bf187b144ccc308 Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Thu, 17 Oct 2024 23:58:36 +0400 Subject: [PATCH 27/29] New2 (#23) * added tests to the workflow * changed tests * changed tests again * add CI * add CI (update) --- .github/workflows/ci.yml | 1 + src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b7542a4..0c683012 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,7 @@ jobs: - name: dotnet publish run: dotnet publish src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj --configuration Release -o artifacts +<<<<<<< HEAD - uses: actions/upload-artifact@v4 with: diff --git a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs index 93a515b6..baad2092 100644 --- a/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs +++ b/src/GitHubActionsDotNet.Api/Models/WeatherForecast.cs @@ -11,4 +11,5 @@ public record WeatherForecast public string? Summary { get; init; } public string? Observatory { get; init; } + } From 7190dbe2350b56619858ba53d16d50b1044667cf Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Fri, 18 Oct 2024 00:01:07 +0400 Subject: [PATCH 28/29] update --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c683012..2b7542a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,6 @@ jobs: - name: dotnet publish run: dotnet publish src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj --configuration Release -o artifacts -<<<<<<< HEAD - uses: actions/upload-artifact@v4 with: From 3a898e65e74547851a9aa40bb36f1576cdf6734c Mon Sep 17 00:00:00 2001 From: nikoloz2 Date: Fri, 18 Oct 2024 00:03:45 +0400 Subject: [PATCH 29/29] fuck you --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c683012..2b7542a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,6 @@ jobs: - name: dotnet publish run: dotnet publish src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj --configuration Release -o artifacts -<<<<<<< HEAD - uses: actions/upload-artifact@v4 with: