8000 ci: run the property-test and NFS lock nightlies on main and v3 (#940) by adityamukho · Pull Request #947 · 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
37 changes: 32 additions & 5 deletions .github/workflows/nfs-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@ 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') }})

on:
schedule:
- cron: "41 2 * * *"
# After the weekly corpus slots at 08:00/20:00 UTC.
- cron: "17 9 * * *" # main
- cron: "17 21 * * *" # v3
workflow_dispatch:
inputs:
ref:
description: Branch, tag or SHA to test
type: string
required: true
default: main

permissions:
contents: read
Expand All @@ -19,6 +31,7 @@ permissions:
# location cannot identify the examples directory. Keep the build destination
# and the lock suites' helper override in sync (#887).
env:
TEST_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || (github.event.schedule == '17 21 * * *' && 'v3' || 'main') }}
CARGO_TARGET_DIR: ${{ github.workspace }}/target
MINIGRAF_PID_NS_HELPER: ${{ github.workspace }}/target/debug/examples/pid_ns_helper

Expand All @@ -30,6 +43,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.TEST_REF }}

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -83,14 +98,19 @@ jobs:
echo "The nightly NFS lock suite failed."
echo
echo "- Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
echo "- Commit: $GITHUB_SHA"
echo "- Ref: $TEST_REF"
echo "- Commit: $(git rev-parse HEAD 2>/dev/null || echo unavailable)"
echo "- Reproduce: needs a loopback NFS export mounted as vers=4; see"
echo " the \"nfs\" job in .github/workflows/nfs-lock.yml"
echo
echo "## Test output"
echo
echo '```text'
tail -n 1000 nfs-lock-output.txt
if [ -f nfs-lock-output.txt ]; then
tail -n 1000 nfs-lock-output.txt
else
echo "No test output was captured."
fi
echo '```'
} > "$report_file"

Expand All @@ -116,6 +136,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.TEST_REF }}

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -143,14 +165,19 @@ jobs:
echo "The nightly Docker lock suite failed."
echo
echo "- Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
echo "- Commit: $GITHUB_SHA"
echo "- Ref: $TEST_REF"
echo "- Commit: $(git rev-parse HEAD 2>/dev/null || echo unavailable)"
echo "- Reproduce: needs a reachable Docker daemon; see the \"docker\" job"
echo " in .github/workflows/nfs-lock.yml"
echo
echo "## Test output"
echo
echo '```text'
tail -n 1000 docker-lock-output.txt
if [ -f docker-lock-output.txt ]; then
tail -n 1000 docker-lock-output.txt
else
echo "No test output was captured."
fi
echo '```'
} > "$report_file"

Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/property-tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
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') }})

on:
schedule:
# Offset from the 02:00 UTC benchmark schedule to avoid runner contention.
- cron: "23 2 * * *"
# After the NFS slots, away from benchmark/fuzz starts.
- cron: "23 10 * * *" # main
- cron: "23 22 * * *" # v3
workflow_dispatch:
inputs:
ref:
description: Branch, tag or SHA to test
type: string
required: true
default: main

permissions:
contents: read
issues: write

env:
TEST_REF: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || (github.event.schedule == '23 22 * * *' && 'v3' || 'main') }}

jobs:
proptest:
name: Property tests (${{ matrix.test }})
Expand All @@ -31,11 +45,16 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.TEST_REF }}

# Detect the optional suite in the checkout, including tags and candidate SHAs.
- name: Install Rust stable
if: ${{ matrix.test != 'model_based_test' || hashFiles('tests/model_based_test.rs') != '' }}
uses: dtolnay/rust-toolchain@stable

- name: Run property tests
if: ${{ matrix.test != 'model_based_test' || hashFiles('tests/model_based_test.rs') != '' }}
shell: bash
run: |
set -o pipefail
Expand All @@ -58,13 +77,18 @@ jobs:
echo "The nightly property-test workflow failed in \`$TEST_NAME\`."
echo
echo "- Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
echo "- Commit: $GITHUB_SHA"
echo "- Ref: $TEST_REF"
echo "- Commit: $(git rev-parse HEAD 2>/dev/null || echo unavailable)"
echo "- Reproduce: \`PROPTEST_CASES=$CASES cargo test --test $TEST_NAME -- --nocapture\`"
echo
echo "## Test output"
echo
echo '```text'
tail -n 1000 proptest-output.txt
if [ -f proptest-output.txt ]; then
tail -n 1000 proptest-output.txt
else
echo "No test output was captured."
fi
echo '```'
} > "$report_file"

Expand Down
Loading
0