From ef203e8464b8859d5b6a8687ab86d5640b2d1638 Mon Sep 17 00:00:00 2001 From: mkhululimbanjwa <90555299+mkhululimbanjwa@users.noreply.github.com> Date: Sun, 7 Dec 2025 18:32:27 +0200 Subject: [PATCH 1/3] Create main.yml --- .github/workflows/main.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..78e5623149 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,47 @@ +name: 'Lint Code' +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] +jobs: + lint_python: + name: Lint Python Files + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.12 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + - name: Print working directory + run: pwd + - name: Run Linter + run: | + pwd + # This command finds all Python files recursively and runs flake8 on them + find . -name "*.py" -exec flake8 {} + + echo "Linted all the python files successfully" + lint_js: + name: Lint JavaScript Files + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 14 + - name: Install JSHint + run: npm install jshint --global + - name: Run Linter + run: | + # This command finds all JavaScript files recursively and runs JSHint on them + find ./server/database -name "*.js" -exec jshint {} + + echo "Linted all the js files successfully" From 63cb5ea3221ad51d8e6a5a2b30367ba80cb38b0e Mon Sep 17 00:00:00 2001 From: mkhululimbanjwa <90555299+mkhululimbanjwa@users.noreply.github.com> Date: Thu, 11 Dec 2025 17:01:59 +0200 Subject: [PATCH 2/3] 1main.yml --- .github/workflows/{main.yml => 1main.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{main.yml => 1main.yml} (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/1main.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/1main.yml From 6f071296d8476d0665be1029a5ed1ea8832264a6 Mon Sep 17 00:00:00 2001 From: mkhululimbanjwa <90555299+mkhululimbanjwa@users.noreply.github.com> Date: Wed, 17 Dec 2025 15:47:10 +0200 Subject: [PATCH 3/3] Create main.yml --- .github/workflows/main.yml | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..1d5c207add --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,59 @@ +name: 'Lint Code' + +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + +jobs: + lint_python: + name: Lint Python Files + runs-on: ubuntu-latest + + steps: + + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.12 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + + - name: Print working directory + run: pwd + + - name: Run Linter + run: | + pwd + # This command finds all Python files recursively and runs flake8 on them + find . -name "*.py" -exec flake8 {} + + echo "Linted all the python files successfully" + + lint_js: + name: Lint JavaScript Files + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 14 + + - name: Install JSHint + run: npm install jshint --global + + - name: Run Linter + run: | + # This command finds all JavaScript files recursively and runs JSHint on them + find ./server/database -name "*.js" -exec jshint {} + + echo "Linted all the js files successfully"