Merge pull request #25 from ZenonEl/feat/tests #41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TelegramMediaRelayBot CI | |
| on: | |
| push: | |
| branches: [ "main", "master" ] | |
| pull_request: | |
| branches: [ "main", "master" ] | |
| jobs: | |
| build_and_run: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| AppSettings__TelegramBotToken: ${{ secrets.BOT_TOKEN }} | |
| AppSettings__SqlConnectionString: "Data Source=sqlite.db" | |
| AppSettings__DatabaseName: "TikTokMediaRelayBot" | |
| AppSettings__DatabaseType: "SQLite" | |
| AppSettings__UseGalleryDl: true | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.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: Run bot (2 minutes) | |
| run: | | |
| dotnet run --configuration Release --project TelegramMediaRelayBot.csproj |