Skip to content

Merge pull request #279 from rGunti/258-bug-twitch-online-detection-n… #761

Merge pull request #279 from rGunti/258-bug-twitch-online-detection-n…

Merge pull request #279 from rGunti/258-bug-twitch-online-detection-n… #761

Workflow file for this run

name: Build & Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build & Test Project
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: csharp
build-mode: manual
config-file: ./.github/codeql/codeql-config.yml
- name: Restore dependencies
run: |
dotnet restore src/FloppyBot.sln
- name: Build
run: dotnet build --no-restore src/FloppyBot.sln
- name: Test
run: dotnet test --no-restore --no-build src/FloppyBot.sln
env:
FLOPPYTEST_DiscordBot1__ClientId: ${{ secrets.DISCORD_1_CLIENT_ID }}
FLOPPYTEST_DiscordBot1__ClientSecret: ${{ secrets.DISCORD_1_CLIENT_SECRET }}
FLOPPYTEST_DiscordBot1__Token: ${{ secrets.DISCORD_1_TOKEN }}
FLOPPYTEST_DiscordBot2__ClientId: ${{ secrets.DISCORD_2_CLIENT_ID }}
FLOPPYTEST_DiscordBot2__ClientSecret: ${{ secrets.DISCORD_2_CLIENT_SECRET }}
FLOPPYTEST_DiscordBot2__Token: ${{ secrets.DISCORD_2_TOKEN }}
FLOPPYTEST_DiscordServerId: ${{ secrets.DISCORD_SERVER_ID }}
FLOPPYTEST_DiscordChannelId: ${{ secrets.DISCORD_CHANNEL_ID }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:csharp"
code-style:
name: Check Code Style
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: |
dotnet restore src/FloppyBot.sln
dotnet tool restore
- name: Check Code Format
run: |
dotnet csharpier --check src/
- name: Check Code Style
run: |
dotnet format style --verify-no-changes src/
- name: Run Format Analyzer
run: |
dotnet format analyzers --verify-no-changes src/