From 80cfe2f9f99122dcfcca5e468276586112f68770 Mon Sep 17 00:00:00 2001 From: Mmeli Date: Thu, 6 Nov 2025 14:23:53 +0200 Subject: [PATCH 1/2] Github Actions: Linting, test ETL scripts, validate SQL --- .github/workflows/pull-request.yml | 47 ++++++++++++++++++++++-------- README.md | 3 +- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8095124..8a909a2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -33,21 +33,44 @@ jobs: fi echo "✅ Issue link found in PR description" - run-ci: - name: Run CI Checks + lint: + name: Lint Python Code runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install flake8 + run: pip install flake8 + - name: Lint backend + run: flake8 Back-End/etl/ + - name: Lint dashboard + run: flake8 Dashboard/ - - name: Lint Python (backend) - run: | - pip install flake8 - flake8 Back-End/etl/ - - - name: Lint Streamlit app - run: | - flake8 dashboard/ + test-etl: + name: Test ETL Scripts + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install dependencies + run: pip install -r Dashboard/requirements.txt + - name: Run ETL tests + run: pytest Back-End/etl/tests - - name: Validate SQL files + validate-sql: + name: Validate SQL Syntax + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check SQL files run: | - grep -i "select" Back-End/sql/*.sql || echo "No SELECT statements found" + for file in Back-End/sql/*.sql; do + echo "Validating $file" + sqlite3 :memory: < "$file" || echo "Syntax error in $file" + done diff --git a/README.md b/README.md index 8ae967c..4dfe271 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,8 @@ Visualize metrics with modern frontend tools. ## License -This project is open-source under the MIT License. You may use, modify, and distribute it with attribution. +This project is licensed under the [Apache License 2.0](LICENSE). + ## Author From dd07aa0ec5c9ec00494b78e93345cdcf82cf244d Mon Sep 17 00:00:00 2001 From: Mmeli Date: Thu, 6 Nov 2025 14:29:04 +0200 Subject: [PATCH 2/2] trigger gh actions --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8a909a2..70f928d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,6 +20,7 @@ jobs: fi echo "✅ Branch name is valid: $BRANCH_NAME" + check-issue-link: name: Check Issue Link runs-on: ubuntu-latest