-
Notifications
You must be signed in to change notification settings - Fork 0
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 #28 from DevOps2025Group1/tim/pipeline_checks
Expand GH pipeline with pylint and bandit
- Loading branch information
Showing
4 changed files
with
52 additions
and
57 deletions.
There are no files selected for viewing
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,47 @@ | ||
name: Run static analysis on the code | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
[ main ] | ||
|
||
jobs: | ||
# Run pylint to check for code quality | ||
pylint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip3 install pylint | ||
pip3 install -r requirements.txt | ||
- name: Run pylint | ||
run: | | ||
pylint . --max-line-length=120 --disable=invalid-name,missing-function-docstring | ||
# Run Bandit to check for common security vulnerabilities | ||
bandit: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install dependencies | ||
run: pip3 install bandit | ||
|
||
- name: Run Bandit | ||
run: bandit -r . |
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,3 +1,5 @@ | ||
"""The main file of the project.""" | ||
|
||
from openai import OpenAI | ||
import streamlit as st | ||
|
||
|
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,4 +1,6 @@ | ||
"""A placeholder page for the user's profile details.""" | ||
|
||
import streamlit as st | ||
|
||
st.title("Your profile details") | ||
st.text("TODO") | ||
st.text("TODO") |