Skip to content

Cross-Version Tests and Upload #1698

Cross-Version Tests and Upload

Cross-Version Tests and Upload #1698

name: Cross-Version Tests and Upload
on:
schedule:
- cron: "0 0,19 * * *" # 12PM, 5PM Pacific; daily
- cron: "0 15 * * *" # 8AM Pacific; daily (separate trigger for uploading release candidate)
workflow_dispatch:
inputs:
batfish_repo:
description: "GitHub repo containing Batfish"
type: string
required: false
default: "batfish/batfish"
batfish_ref:
description: "Batfish ref to build a container from"
type: string
required: false
default: "master"
pybatfish_repo:
description: "GitHub repo containing Pybatfish"
type: string
required: false
default: "batfish/pybatfish"
pybatfish_ref:
description: "Pybatfish ref to build a wheel from"
type: string
required: false
default: "master"
jobs:
# Initial checks and build artifacts
precommit:
uses: ./.github/workflows/reusable-precommit.yml
with:
BATFISH_GITHUB_BATFISH_REPO: "${{ github.event.inputs.batfish_repo || 'batfish/batfish' }}"
BATFISH_GITHUB_BATFISH_REF: "${{ github.event.inputs.batfish_ref || 'master' }}"
BATFISH_GITHUB_PYBATFISH_REPO: "${{ github.event.inputs.pybatfish_repo || 'batfish/pybatfish' }}"
BATFISH_GITHUB_PYBATFISH_REF: "${{ github.event.inputs.pybatfish_ref || 'master' }}"
# Integration tests
test:
needs: precommit
uses: ./.github/workflows/reusable-integration-tests.yml
with:
bf_version: ${{ needs.precommit.outputs.bf_version }}
bf_test_artifact_age: "90"
bf_min_release_test_count: "2"
pybf_min_release_test_count: "2" # todo: bump to 3 once we have 3 releases with new API support
run_cross_version_tests: true
# Push public artifacts
upload:
needs:
- precommit
- test
uses: ./.github/workflows/reusable-upload.yml
with:
bf_version: ${{ needs.precommit.outputs.bf_version }}
# Consider manual builds or 8AM Pacific scheduled builds as a release candidate
queue_prod_release: ${{ github.event_name == 'workflow_dispatch' || github.event.schedule == '0 15 * * *' }}
test_tag: "test-${{ needs.precommit.outputs.bf_version }}"
release_tag: "${{ needs.precommit.outputs.bf_version }}"
BATFISH_GITHUB_BATFISH_REPO: "${{ needs.precommit.outputs.batfish_repo }}"
BATFISH_GITHUB_PYBATFISH_REPO: "${{ needs.precommit.outputs.pybatfish_repo }}"
BATFISH_GITHUB_PYBATFISH_REF: "${{ needs.precommit.outputs.pybatfish_resolved_sha }}"
secrets:
PYBATFISH_TEST_PYPI_TOKEN: ${{ secrets.PYBATFISH_TEST_PYPI_TOKEN }}
PYBATFISH_PYPI_TOKEN: ${{ secrets.PYBATFISH_PYPI_TOKEN }}
BATFISH_DOCKER_LOGIN_TOKEN: ${{ secrets.BATFISH_DOCKER_LOGIN_TOKEN }}
OPEN_SOURCE_BUILDKITEBOT_PUBLIC_REPO_TOKEN: ${{ secrets.OPEN_SOURCE_BUILDKITEBOT_PUBLIC_REPO_TOKEN }}