Skip to content

Commit

Permalink
refactor(ci): linting of workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
GoetzGoerisch committed Oct 7, 2024
1 parent ce4a508 commit d1eb511
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 29 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
---
name: Build

on:
push:
pull_request:
branches: [main, development]
merge_group:


permissions: read-all

jobs:
build-linux:
strategy:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/clean-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 1 * *'
- cron: "0 0 1 * *"

permissions:
contents: read
packages: write

jobs:
build:
Expand All @@ -28,4 +32,4 @@ jobs:
const deleteResponse = await github.request("DELETE /orgs/${{ github.repository_owner }}/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
console.log("status " + deleteResponse.status)
}
}
}
46 changes: 24 additions & 22 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ name: "CodeQL"

on:
push:
branches: [ "development", main ]
branches: ["development", main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "development" ]
branches: ["development"]
schedule:
- cron: '0 3 * * 1'
- cron: "0 3 * * 1"

permissions: read-all

jobs:
analyze:
Expand All @@ -35,34 +37,34 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python' ]
language: ["cpp", "python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
submodules: recursive

# 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.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# 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.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

- name: Build ${{ github.repository }} with dependencies
run: |
- name: Build ${{ github.repository }} with dependencies
run: |
mkdir -p build
cd build
cmake ../.github/ \
-DCMAKE_INSTALL_PREFIX:PATH="${{ env.CMAKE_INSTALL_PREFIX }}"
cmake --build .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
8 changes: 5 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
pull_request:
branches: [main, develop]

permissions: read-all

###############
# Set the Job #
###############
Expand Down Expand Up @@ -49,12 +51,12 @@ jobs:
- name: Lint Code Base
uses: super-linter/super-linter@v5.7.2
env:
VALIDATE_CPP: false # Use clang-formt instead
VALIDATE_CPP: false # Use clang-format instead
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# CMake Format
# CMake Format
cmake-format-linter:
name: Lint Code Base (cmake-format-lint)
runs-on: ubuntu-22.04
Expand All @@ -64,4 +66,4 @@ jobs:
id: cmake-format
uses: PuneetMatharu/cmake-format-lint-action@v1.0.4
with:
args: --config-files cmake-format.yaml
args: --config-files cmake-format.yaml

0 comments on commit d1eb511

Please sign in to comment.