-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #476 from vortexntnu/470-task-set-up-cicd-pipeline…
…s-for-c Restructure CI/CD Pipelines and add pre-commit hooks
- Loading branch information
Showing
46 changed files
with
1,469 additions
and
1,504 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
theses | ||
theses |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Bandit Security Scan | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
bandit: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install bandit | ||
run: | | ||
python -m pip install bandit[toml] | ||
- name: Run bandit scan | ||
run: | | ||
bandit -c pyproject.toml -r . --severity-level medium |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Black Code Formatter Check | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install black | ||
run: | | ||
python -m pip install black | ||
- name: Run black | ||
run: | | ||
black --check . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Clang-Format Code Style Check | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
clang-format: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install clang-format | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y clang-format | ||
- name: Run clang-format check | ||
run: | | ||
# Find all C/C++ source and header files | ||
find . -type f \( -name '*.c' -o -name '*.cpp' -o -name '*.cc' -o -name '*.cxx' -o -name '*.h' -o -name '*.hpp' -o -name '*.hh' -o -name '*.hxx' \) -print0 | xargs -0 clang-format -i | ||
# Check if any files were modified | ||
if [[ $(git status --porcelain) ]]; then | ||
echo "Code is not properly formatted. Please run clang-format." | ||
echo "Modified files:" | ||
git status --porcelain | ||
echo "Differences:" | ||
git --no-pager diff | ||
exit 1 | ||
else | ||
echo "All code is properly formatted." | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: isort Import Sorting Check | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
isort: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install isort | ||
run: | | ||
python -m pip install isort | ||
- name: Run isort | ||
run: | | ||
isort --check . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Mypy Type Checker | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
mypy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install mypy | ||
run: | | ||
python -m pip install mypy | ||
- name: Run mypy | ||
run: | | ||
mypy . --explicit-package-bases |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Pylint Code Linter | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
pylint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install pylint | ||
run: | | ||
python -m pip install pylint | ||
- name: Run pylint | ||
run: | | ||
pylint . |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.