Dev data team shared #41
This file contains hidden or 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
| name: CI - Pull Request Checks | |
| # Run CI on all pull requests just incase of hot fixes | |
| on: | |
| pull_request: | |
| branches: | |
| - '**' # all branches | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: "Linting" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Commit lint placeholder | |
| # TODO: Implement commitlint with config from TELBlazor reference | |
| run: | | |
| echo "WARNING: Commit lint step is currently a placeholder." | |
| echo "Reference project: TELBlazor" | |
| # exit 0 <-- Change to 0 if you don't want to block the rest of the pipe yet | |
| pytest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Upgrade pip | |
| run: python -m pip install --upgrade pip | |
| - name: Install project + test deps | |
| run: | | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: Run pytest againt unit tests (exclude Databricks tests) | |
| run: | | |
| pytest tests/unit-tests -m "not databricks" -v | |
| dab-validate: | |
| name: "Early warning of dab issues" | |
| runs-on: ubuntu-latest | |
| # Just dev we are not deploying so dont need access to more important service principle | |
| # !!!! TODO !!!!! Should be dev but git needs the service principle putting into its environment | |
| environment: staging | |
| env: | |
| DATABRICKS_HOST: ${{ vars.DBX_HOST }} | |
| DATABRICKS_CLIENT_ID: ${{ vars.DBX_SP_ID }} | |
| DATABRICKS_CLIENT_SECRET: ${{ secrets.DBX_SP_SECRET }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Databricks CLI | |
| uses: databricks/setup-cli@main | |
| - name: Validate Bundle | |
| # Am i forced to have a target its after databrickcfg but shouldnt be | |
| run: databricks bundle validate -t staging |