Skip to content

chore(ci): track test project + solution, run tests in CI #60

chore(ci): track test project + solution, run tests in CI

chore(ci): track test project + solution, run tests in CI #60

Workflow file for this run

name: TelegramMediaRelayBot CI
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
jobs:
build_and_run:
runs-on: ubuntu-latest
env:
CI: true
Bot__Token: ${{ secrets.BOT_TOKEN }}
Database__ConnectionString: "Data Source=sqlite.db"
Database__Name: "TelegramMediaRelayBot"
Download__UseGalleryDl: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install yt-dlp and gallery-dl
run: |
sudo apt-get update
sudo apt-get install -y yt-dlp gallery-dl
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --configuration Release
- name: Run bot (2 minutes)
run: |
dotnet run --configuration Release --project TelegramMediaRelayBot.csproj