Skip to content

PR to test extended test runs #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
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
114 changes: 66 additions & 48 deletions .github/workflows/extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,77 +33,95 @@ on:
push:
branches:
- main
issue_comment:
types: [created]

permissions:
pull-requests: write

jobs:
# Check crate compiles and base cargo check passes
linux-build-lib:
name: linux build test
# Check issue comment and notify that extended tests are running
check_issue_comment:
name: Check issue comment
runs-on: ubuntu-latest
container:
image: amd64/rust
if: github.event.issue.pull_request && github.event.comment.body == 'run extended tests'
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
- uses: actions/github-script@v7
with:
rust-version: stable
- name: Prepare cargo build
run: cargo check --profile ci --all-targets
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Running extended tests..."
})

# Run extended tests (with feature 'extended_tests')
linux-test-extended:
name: cargo test 'extended_tests' (amd64)
needs: linux-build-lib
# Check crate compiles and base cargo check passes
linux-build-lib:
name: linux build test
runs-on: ubuntu-latest
container:
image: amd64/rust
if: |
github.event_name == 'push' ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.comment.body == 'run extended tests')
steps:
- uses: actions/checkout@v4
with:
# Check out the pull request branch if triggered by a comment
ref: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request.head.ref || github.ref }}
submodules: true
fetch-depth: 1
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Run tests (excluding doctests)
run: cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --workspace --lib --tests --bins --features avro,json,backtrace,extended_tests
- name: Verify Working Directory Clean
run: git diff --exit-code
- name: Prepare cargo build
run: cargo check --profile ci --all-targets

# Check answers are correct when hash values collide
hash-collisions:
name: cargo test hash collisions (amd64)
notify_if_run_on_pr_success:
name: Notify
runs-on: ubuntu-latest
container:
image: amd64/rust
needs:
[
linux-test-extended,
hash-collisions,
sqllogictest-sqlite,
check_issue_comment,
]
if: success()
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
submodules: true
fetch-depth: 1
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- name: Run tests
run: |
cd datafusion
cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --workspace --lib --tests --features=force_hash_collisions,avro,extended_tests
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "extended test suite ran successfully on this PR."
})

sqllogictest-sqlite:
name: "Run sqllogictests with the sqlite test suite"
notify_if_run_on_pr_failure:
name: Notify
runs-on: ubuntu-latest
container:
image: amd64/rust
needs:
[
linux-test-extended,
hash-collisions,
sqllogictest-sqlite,
check_issue_comment,
]
if: failure()
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
- uses: actions/github-script@v7
with:
rust-version: stable
- name: Run sqllogictest
run: cargo test --profile release-nonlto --test sqllogictests -- --include-sqlite
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "extended test suite failed on this PR."
})
2 changes: 1 addition & 1 deletion datafusion-testing
Loading
Loading