8000 ci: make the property-test and NFS lock nightlies match the other v3 nightlies (#940) by adityamukho · Pull Request #964 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .github/workflows/nfs-lock.yml
8000
Original file line number Diff line numberDiff line change
Expand Up @@ -6,9 +6,16 @@ name: NFS/Docker lock tests (nightly)
# reach how `std::fs::File::try_lock` behaves on a network filesystem or in
# real containers. See #324.

# Schedules use the default branch workflow; keep both branch copies identical.
# At #937, remap the schedules to main/v2.x and update TEST_REF/run-name.
run-name: NFS/Docker lock tests (${{ github.event_name == 'workflow_dispatch' && inputs.ref || (github.event.schedule == '17 21 * * *' && 'v3' || 'main') }})
# Two branches alternate every 12 hours: main at 09:17 UTC, v3 at 21:17 UTC.
# Scheduled runs always use this file from the default branch, so the branch
# under test is chosen from the cron string that fired (as in bench.yml and
# crash-kill.yml). Each scheduled run checks out the branch head, its latest
# commit. Keep the cron strings here and in TEST_REF/run-name identical, and
# keep this file the same on main and v3. At #937, remap the schedules to
# main/v2.x.
run-name: >-
NFS/Docker lock tests (${{ github.event_name == 'workflow_dispatch' && inputs.ref
|| (github.event.schedule == '17 21 * * *' && 'v3' || 'main') }})

on:
schedule:
Expand All @@ -18,8 +25,7 @@ on:
workflow_dispatch:
inputs:
ref:
description: Branch, tag or SHA to test
type: string
description: Branch to test
required: true
default: main

Expand Down Expand Up @@ -91,7 +97,7 @@ jobs:
shell: bash
env:
GH_TOKEN: ${{ github.token }}
ISSUE_TITLE: "Nightly NFS lock-suite failure"
ISSUE_TITLE: "Nightly NFS lock-suite failure (${{ env.TEST_REF }})"
run: |
report_file="nfs-lock-failure.md"
{
Expand Down Expand Up @@ -120,7 +126,7 @@ jobs:
--search "$ISSUE_TITLE in:title" \
--json number,title \
--limit 100 \
--jq '.[] | select(.title == "Nightly NFS lock-suite failure") | .number' \
--jq ".[] | select(.title == \"$ISSUE_TITLE\") | .number" \
| head -n 1)"

if [ -n "$existing_issue" ]; then
Expand Down Expand Up @@ -158,7 +164,7 @@ jobs:
shell: bash
env:
GH_TOKEN: ${{ github.token }}
ISSUE_TITLE: "Nightly Docker lock-suite failure"
ISSUE_TITLE: "Nightly Docker lock-suite failure (${{ env.TEST_REF }})"
run: |
report_file="docker-lock-failure.md"
{
Expand Down Expand Up @@ -187,7 +193,7 @@ jobs:
--search "$ISSUE_TITLE in:title" \
--json number,title \
--limit 100 \
--jq '.[] | select(.title == "Nightly Docker lock-suite failure") | .number' \
--jq ".[] | select(.title == \"$ISSUE_TITLE\") | .number" \
| head -n 1)"

if [ -n "$existing_issue" ]; then
Expand Down
31 changes: 22 additions & 9 deletions 8000 .github/workflows/property-tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
name: Property Tests (nightly)

# Schedules use the default branch workflow; keep both branch copies identical.
# At #937, remap the schedules to main/v2.x and update TEST_REF/run-name.
run-name: Property Tests (${{ github.event_name == 'workflow_dispatch' && inputs.ref || (github.event.schedule == '23 22 * * *' && 'v3' || 'main') }})
# Two branches alternate every 12 hours: main at 10:23 UTC, v3 at 22:23 UTC.
# Scheduled runs always use this file from the default branch, so the branch
# under test is chosen from the cron string that fired (as in bench.yml and
# crash-kill.yml). Each scheduled run checks out the branch head, its latest
# commit. Keep the cron strings here and in TEST_REF/run-name identical, and
# keep this file the same on main and v3. At #937, remap the schedules to
# main/v2.x.
run-name: >-
Property Tests (${{ github.event_name == 'workflow_dispatch' && inputs.ref
|| (github.event.schedule == '23 22 * * *' && 'v3' || 'main') }})

on:
schedule:
Expand All @@ -12,8 +19,7 @@ on:
workflow_dispatch:
inputs:
ref:
description: Branch, tag or SHA to test
type: string
description: Branch to test
required: true
default: main

Expand Down Expand Up @@ -48,7 +54,14 @@ jobs:
with:
ref: ${{ env.TEST_REF }}

# Detect the optional suite in the checkout, including tags and candidate SHAs.
# model_based_test exists only on v3. A scheduled v3 checkout must never
# silently skip it (as in smoke.yml); elsewhere the leg is skipped.
- name: Require the v3 model-based suite
if: ${{ matrix.test == 'model_based_test' && github.event.schedule == '23 22 * * *' && hashFiles('tests/model_based_test.rs') == '' }}
run: |
echo "::error::Scheduled v3 run, but tests/model_based_test.rs is missing at $(git rev-parse HEAD)"
exit 1

- name: Install Rust stable
if: ${{ matrix.test != 'model_based_test' || hashFiles('tests/model_based_test.rs') != '' }}
uses: dtolnay/rust-toolchain@stable
Expand All @@ -68,13 +81,13 @@ jobs:
shell: bash
env:
GH_TOKEN: ${{ github.token }}
ISSUE_TITLE: "Nightly property-test failure"
ISSUE_TITLE: "Nightly property-test failure (${{ env.TEST_REF }}, ${{ matrix.test }})"
TEST_NAME: ${{ matrix.test }}
CASES: ${{ matrix.cases }}
run: |
report_file="property-test-failure.md"
{
echo "The nightly property-test workflow failed in \`$TEST_NAME\`."
echo "The nightly property-test workflow failed in \`$TEST_NAME\` on $TEST_REF."
echo
echo "- Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
echo "- Ref: $TEST_REF"
Expand All @@ -98,7 +111,7 @@ jobs:
--search "$ISSUE_TITLE in:title" \
--json number,title \
--limit 100 \
--jq '.[] | select(.title == "Nightly property-test failure") | .number' \
--jq ".[] | select(.title == \"$ISSUE_TITLE\") | .number" \
| head -n 1)"

if [ -n "$existing_issue" ]; then
Expand Down
Loading
0