diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..b26fed1 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,37 @@ +on: [push, pull_request] +name: Continuous Integration +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + quality: + name: Code Quality + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8 + + - name: Format + working-directory: src + run: | + dotnet format --verify-no-changes --verbosity diagnostic + + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8 + + - name: Compile + working-directory: src/AdvancedBot.Console + run: | + dotnet build -c Release -warnaserror diff --git a/.github/workflows/console.yaml b/.github/workflows/console.yaml deleted file mode 100644 index c599e10..0000000 --- a/.github/workflows/console.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Console CI/CD - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8 - - - name: Build - working-directory: src/AdvancedBot.Console - run: | - dotnet build -c Release