updated configs #15
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: Format and lint the code and run unit and integration tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - 'mlops_demo/**' | |
| - '.github/workflows/mlops_demo-run-tests.yml' | |
| defaults: | |
| run: | |
| working-directory: ./mlops_demo/ | |
| env: | |
| DATABRICKS_TOKEN: ${{ secrets.STAGING_WORKSPACE_TOKEN }} | |
| concurrency: mlops_demo-feature-training-integration-test-staging | |
| jobs: | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Format all files | |
| run: make dev fmt | |
| - name: Fail on differences | |
| run: git diff --exit-code | |
| unit_tests: | |
| needs: fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.10.12 | |
| cache: 'pip' | |
| cache-dependency-path: '**/pyproject.toml' | |
| - name: Run unit tests | |
| run: | | |
| pip install hatch==1.9.4 | |
| make test | |
| integration_test: | |
| needs: unit_tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - uses: databricks/[email protected] | |
| - name: Validate Bundle For Test Deployment Target in Staging Workspace | |
| id: validate | |
| run: | | |
| databricks bundle validate -t ci | |
| - name: Deploy Bundle to Test Deployment Target in Staging Workspace | |
| id: deploy | |
| run: | | |
| databricks bundle deploy -t ci | |
| - name: Run Feature Engineering Workflow for Test Deployment Target in Staging Workspace | |
| id: feature_engineering | |
| run: | | |
| databricks bundle run write_feature_table_job -t ci | |
| - name: Run Training Workflow for Test Deployment Target in Staging Workspace | |
| id: training | |
| run: | | |
| databricks bundle run model_training_job -t ci |