From 13be4ba57932c8b53805095bc5721fab55a58a80 Mon Sep 17 00:00:00 2001 From: Stijn Moreels <9039753+stijnmoreels@users.noreply.github.com> Date: Thu, 4 Dec 2025 08:04:32 +0100 Subject: [PATCH] chore(gh): sync gh workflows with other arcus repos --- .github/workflows/code-coverage.yml | 40 ---------------- .github/workflows/codeql-analysis.yml | 68 ++++++++++++++------------- .github/workflows/dotnet-format.yml | 20 ++++++++ 3 files changed, 55 insertions(+), 73 deletions(-) delete mode 100644 .github/workflows/code-coverage.yml create mode 100644 .github/workflows/dotnet-format.yml diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml deleted file mode 100644 index cd1a7195..00000000 --- a/.github/workflows/code-coverage.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "Code Coverage" - -on: - push: - branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - - strategy: - fail-fast: false - matrix: - language: [ 'csharp' ] - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 10.0.x - - name: Coverlet coverage test - uses: b3b00/coverlet-action@1.2.4 - with: - testProject: 'src/Arcus.Observability.Tests.Unit/Arcus.Observability.Tests.Unit.csproj' - excludes: '[Arcus.Observability.Tests.*]**' - threshold: 80 - output: 'coverage.xml' - outputFormat: 'opencover' - - - name: Codecov - uses: codecov/codecov-action@v3.1.1 - if: always() \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f0795113..67f0a5fb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,16 +9,16 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: 'CodeQL' on: push: - branches: [ main ] + branches: [main] pull_request: # The branches below must be a subset of the branches above - branches: [ main ] + branches: [main] schedule: - - cron: '41 10 * * 5' + - cron: '43 10 * * 5' jobs: analyze: @@ -32,42 +32,44 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'csharp' ] + language: ['csharp'] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - - name: Checkout repository - uses: actions/checkout@v2 - - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 10.0.x + - name: Checkout repository + uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 10.0.x - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - #- run: | - # make bootstrap - # make release + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dotnet-format.yml b/.github/workflows/dotnet-format.yml new file mode 100644 index 00000000..9efa9400 --- /dev/null +++ b/.github/workflows/dotnet-format.yml @@ -0,0 +1,20 @@ +name: .NET format + +on: + push: + branches: ['main'] + pull_request: + branches: ['main'] + +jobs: + dotnet-format: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 10.0.x + - name: Format + run: dotnet format src/Arcus.Observability.sln --verify-no-changes --verbosity diagnostic