bbolt/.github/workflows/robustness_template.yaml
Ivan Valdes 06d4621c8f
github/workflows: skip robustness tests in forks
Robustness tests require a larger instance size, which user forks cannot
access. It also tries to trigger an ARM64 build that runs on actuated
infrastructure. By not running them on user forks, contributors won't be
notified that their builds are failing due to timeouts trying to run the
job, while the tests will still run on etcd-io/bbolt pull requests and
commits.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-04-30 06:28:56 -07:00

38 lines
1.0 KiB
YAML

---
name: Reusable Robustness Workflow
on:
workflow_call:
inputs:
count:
required: true
type: number
testTimeout:
required: false
type: string
default: '30m'
runs-on:
required: false
type: string
default: "['ubuntu-latest']"
permissions: read-all
jobs:
test:
# this is to prevent the job to run at forked projects
if: github.repository == 'etcd-io/bbolt'
timeout-minutes: 210
runs-on: ${{ fromJson(inputs.runs-on) }}
steps:
- uses: actions/checkout@v4
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: test-robustness
run: |
set -euo pipefail
sudo apt-get install -y dmsetup xfsprogs
ROBUSTNESS_TESTFLAGS="--count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} -failfast" make test-robustness