From 2df0ac1c7f07d3c0b70054dce04b01743b23d010 Mon Sep 17 00:00:00 2001 From: Ihor Volokhovych Date: Sun, 17 Nov 2024 14:30:52 +0200 Subject: [PATCH] feat: added CI (#1) --- .github/dependabot.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/dotnet-ci.yml | 27 +++++++++++++++++++++++++++ README.md | 3 +++ TelegramExportProcessor.sln | 9 +++++++++ 4 files changed, 71 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dotnet-ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..14d1960 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,32 @@ +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # NuGet (/*.csproj) + - package-ecosystem: nuget + directory: '/' + schedule: + interval: weekly + time: '08:00' + timezone: Europe/Kyiv + labels: + - 'dependabot:robot:' + commit-message: + prefix: fix + prefix-development: chore + include: scope + + # GitHub Actions (/.github/workflows/*.yml) + - package-ecosystem: github-actions + directory: '/' + schedule: + interval: weekly + time: '08:00' + timezone: Europe/Kyiv + labels: + - 'dependabot:robot:' + commit-message: + prefix: fix + prefix-development: chore + include: scope diff --git a/.github/workflows/dotnet-ci.yml b/.github/workflows/dotnet-ci.yml new file mode 100644 index 0000000..e0fe970 --- /dev/null +++ b/.github/workflows/dotnet-ci.yml @@ -0,0 +1,27 @@ +name: .NET + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.x.x' + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover + - name: Publish coverage report + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index f95529f..fc84d37 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ # TelegramExportProcessor +[![.NET Core](https://github.com/antomys/CuriousBenchmarks/actions/workflows/dotnet-ci.yml/badge.svg?branch=master)](https://github.com/kant2002/TelegramExportProcessor/actions/workflows/dotnet-ci.yml) +[![codecov](https://codecov.io/gh/antomys/CuriousBenchmarks/branch/master/graph/badge.svg?token=8L4HN9FAIV)](https://app.codecov.io/gh/kant2002/TelegramExportProcessor) + Library for reading export JSON files from Telegram Desktop. diff --git a/TelegramExportProcessor.sln b/TelegramExportProcessor.sln index f292236..5747e41 100644 --- a/TelegramExportProcessor.sln +++ b/TelegramExportProcessor.sln @@ -9,6 +9,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TelegramExportProcessor.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TelegramExportProcessor.Sample", "TelegramExportProcessor.Sample\TelegramExportProcessor.Sample.csproj", "{681354E2-454F-415F-9FA0-05098E93A806}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{56B8CC6A-2EEE-41B2-B2F8-F0619C62D862}" + ProjectSection(SolutionItems) = preProject + .gitattributes = .gitattributes + .gitignore = .gitignore + README.md = README.md + .github\dependabot.yml = .github\dependabot.yml + .github\workflows\dotnet-ci.yml = .github\workflows\dotnet-ci.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU