diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8095124..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 @@ -33,21 +34,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