Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Upgrade and modernize the repo #15

Upgrade and modernize the repo

Upgrade and modernize the repo #15

Workflow file for this run

name: PR Flow
on:
pull_request:
branches: [staging, main]
concurrency:
# New commit on branch cancels running workflows of the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-zenml-pipeline:
runs-on: ubuntu-latest
env:
ZENML_STORE_URL: https://11870fb5-zenml.cloudinfra.zenml.io # Replace with your workspace name
ZENML_STORE_API_KEY: ${{ secrets.ZENML_API_KEY }}
ZENML_PROJECT: Gitflow # Replace with your project name
ZENML_STAGING_STACK: zenml-full-gcp-stack # Replace with your staging stack name
ZENML_PRODUCTION_STACK: zenml-full-gcp-stack # Replace with your production stack name
ZENML_GITHUB_SHA: ${{ github.event.pull_request.head.sha }}
ZENML_GITHUB_URL_PR: ${{ github.event.pull_request._links.html.href }}
ZENML_DEBUG: true
ZENML_ANALYTICS_OPT_IN: false
ZENML_LOGGING_VERBOSITY: INFO
steps:
- name: Check out repository code
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install requirements
if: ${{ github.base_ref == 'staging' }}
run: |
pip install uv
uv pip install --system -r requirements.txt
zenml integration install gcp sklearn -y --uv
- name: Install requirements
if: ${{ github.base_ref == 'main' }}
run: |
pip install uv
uv pip install --system -r requirements.txt
zenml integration install gcp sklearn -y --uv
- name: Install wkhtmltopdf
run: |
sudo apt-get update
sudo apt-get install -y wkhtmltopdf
- name: Login to ZenML server
run: |
zenml project set gitflow
- name: Set stack (Staging)
if: ${{ github.base_ref == 'staging' }}
run: |
zenml stack set ${{ env.ZENML_STAGING_STACK }}
- name: Set stack (Production)
if: ${{ github.base_ref == 'main' }}
run: |
zenml stack set ${{ env.ZENML_PRODUCTION_STACK }}
- name: Run pipeline (Staging)
if: ${{ github.base_ref == 'staging' }}
run: |
python run.py \
--environment=staging \
--stack=zenml-full-gcp-stack \
--name=price_prediction_training_${{ env.ZENML_GITHUB_SHA }}
- name: Run pipeline (Production)
if: ${{ github.base_ref == 'main' }}
run: |
python run.py \
--environment=production \
--stack=zenml-full-gcp-stack \
--name=price_prediction_training_${{ env.ZENML_GITHUB_SHA }}
# - name: Read training report
# id: report
# uses: juliangruber/read-file-action@v1
# with:
# path: ./model_train_results.md
# - name: PR comment with training report
# uses: thollander/actions-comment-pull-request@v2
# with:
# filePath: ./model_train_results.md
# comment_tag: training_report
# mode: recreate
# create_if_not_exists: true
Morty Proxy This is a proxified and sanitized view of the page, visit original site.