Skip to content

feat: support skipped or unlimited testbed #85

feat: support skipped or unlimited testbed

feat: support skipped or unlimited testbed #85

Workflow file for this run

name: CI
on:
push:
branches:
- master
- 'stage/**' # branch pattern for general changes
pull_request:
branches:
- master
# Enable running this workflow manually from the Actions tab
workflow_dispatch:
inputs:
index-repo:
description: "Registry index repository"
type: string
required: false
default: leanprover/reservoir-index
reindex:
description: "Reindex packages"
type: boolean
required: false
default: true
toolchain:
description: "Lean toolchain to test against"
type: string
required: false
testbed-size:
description: "Number of packages to test"
type: number
required: false
save-testbed:
description: "Save testbed results to index"
type: boolean
required: false
default: true
# GITHUB_TOKEN permissions needed for deployment (copied from pages.yaml)
permissions:
contents: read
deployments: none
pull-requests: write
statuses: write
jobs:
index:
name: Index
if: (!inputs.index-repo || inputs.reindex)
uses: ./.github/workflows/index.yaml
secrets: inherit
with:
repository: ${{ inputs.reindex && inputs.index-repo || '' }}
testbed:
needs: index
# Run even if `index` is skipped
if: (!failure() && !cancelled() && inputs.testbed-size != null)
name: Testbed
uses: ./.github/workflows/testbed.yaml
secrets: inherit
with:
index-repo: ${{ inputs.index-repo }}
testbed-size: ${{ inputs.testbed-size || (github.ref_name == 'master' && 200 || 0) }}
toolchain: ${{ inputs.toolchain }}
update-index: ${{ inputs.save-testbed == true }}
pages:
needs: [index, testbed]
# Run even if `index` or `testbed` is skipped
if: (!failure() && !cancelled())
name: Pages
uses: ./.github/workflows/pages.yaml
secrets: inherit
with:
index-repo: ${{ inputs.index-repo }}
testbed-artifact: ${{ !(inputs.index-repo && inputs.save-testbed) && inputs.testbed-size != null }}