Skip to content

Nightly Build

Nightly Build #5

Workflow file for this run

name: Nightly Build
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Run every day at midnight (UTC)
env:
POETRY_VERSION: "1.8.3"
PYTHON_VERSION: "3.12"
jobs:
create-nightly-tag:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
permissions:
# Required to create tag
contents: write
outputs:
TAG: ${{ steps.create_tag.outputs.tag }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: true
- name: Set up Python ${{ env.PYTHON_VERSION }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_caching"
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install
- name: Create tag
id: create_tag
run: |
git config --global user.email "jordan.frazier@datastax.com"
git config --global user.name "Langflow Bot"
TAG="$(./scripts/ci/pypi_nightly_tag.py)"
echo "tag=$TAG" >> $GITHUB_OUTPUT
./scripts/ci/update_pyproject_version.py $TAG
./scripts/ci/update_pyproject_name.py langflow-nightly
git add pyproject.toml
git commit -m "Update version and project name in files"
git tag -a $TAG -m "Langflow nightly $TAG"
echo "Created tag: $TAG"
exit 1
# TODO: Slack message on failure
# TODO: update email to noreply or generic
# git push origin $TAG || echo "Tag push failed. Check if the tag already exists."
frontend-tests:
name: Run Frontend Tests
needs: create-nightly-tag
uses: ./.github/workflows/typescript_test.yml
with:
tests_folder: "tests/end-to-end"
ref: ${{ needs.create-nightly-tag.outputs.TAG }}
secrets:
OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"
STORE_API_KEY: "${{ secrets.STORE_API_KEY }}"
backend-unit-tests:
name: Run Backend Unit Tests
needs: create-nightly-tag
uses: ./.github/workflows/python_test.yml
with:
python-versions: '["3.10", "3.11", "3.12"]'
ref: ${{ needs.create-nightly-tag.outputs.TAG }}
backend-integration-tests:
name: Run Backend Integration Tests
needs: create-nightly-tag
uses: ./.github/workflows/integration_tests.yml
with:
python-versions: '["3.10", "3.11", "3.12"]'
ref: ${{ needs.create-nightly-tag.outputs.TAG }}
# release-nightly-build:
# name: Run Nightly Langflow Build
# needs:
# [
# frontend-tests,
# backend-unit-tests,
# backend-integration-tests,
# create-nightly-tag,
# ]
# uses: ./.github/workflows/release_nightly.yml
# with:
# build_docker_base: false
# build_docker_main: false
# nightly_tag: ${{ needs.create-nightly-tag.outputs.TAG }}
# slack-notification:
# name: Send Slack Notification
# needs: run-nightly-build
# runs-on: ubuntu-latest
# steps:
# - name: Send success notification to Slack
# if: success()
# uses: slackapi/slack-github-action@v1.26.0
# with:
# payload: |
# {
# "channel": "#langflow-nightly-builds",
# "username": "GitHub Actions",
# "text": "Nightly Build Successful :white_check_mark:",
# "icon_emoji": ":rocket:"
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# - name: Send failure notification to Slack
# if: failure()
# uses: slackapi/slack-github-action@v1.26.0
# with:
# payload: |
# {
# "channel": "#langflow-nightly-builds",
# "username": "GitHub Actions",
# "text": "Nightly Build Failed :x:",
# "icon_emoji": ":warning:"
# }
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}