Skip to content

Commit 264f4c5

Browse files
authored
Move hash collision test to run only when merging to main. (#13973)
1 parent 63c4d1b commit 264f4c5

File tree

2 files changed

+54
-21
lines changed

2 files changed

+54
-21
lines changed

.github/workflows/hash_collisions.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Rust Hash Collisions
19+
20+
concurrency:
21+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
22+
cancel-in-progress: true
23+
24+
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges
25+
#
26+
# this job is intended to only run on merge to main branch
27+
on:
28+
pull_request:
29+
branches:
30+
- main
31+
types:
32+
- closed
33+
34+
jobs:
35+
# Check answers are correct when hash values collide
36+
hash-collisions:
37+
name: cargo test hash collisions (amd64)
38+
runs-on: ubuntu-latest
39+
container:
40+
image: amd64/rust
41+
if: github.event.pull_request.merged == true
42+
steps:
43+
- uses: actions/checkout@v4
44+
with:
45+
submodules: true
46+
fetch-depth: 1
47+
- name: Setup Rust toolchain
48+
uses: ./.github/actions/setup-builder
49+
with:
50+
rust-version: stable
51+
- name: Run tests
52+
run: |
53+
cd datafusion
54+
cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --workspace --lib --tests --features=force_hash_collisions,avro

.github/workflows/rust.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -541,27 +541,6 @@ jobs:
541541
- name: Run clippy
542542
run: ci/scripts/rust_clippy.sh
543543

544-
# Check answers are correct when hash values collide
545-
hash-collisions:
546-
name: cargo test hash collisions (amd64)
547-
needs: linux-build-lib
548-
runs-on: ubuntu-latest
549-
container:
550-
image: amd64/rust
551-
steps:
552-
- uses: actions/checkout@v4
553-
with:
554-
submodules: true
555-
fetch-depth: 1
556-
- name: Setup Rust toolchain
557-
uses: ./.github/actions/setup-builder
558-
with:
559-
rust-version: stable
560-
- name: Run tests
561-
run: |
562-
cd datafusion
563-
cargo test --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --exclude datafusion-sqllogictest --workspace --lib --tests --features=force_hash_collisions,avro
564-
565544
cargo-toml-formatting-checks:
566545
name: check Cargo.toml formatting
567546
needs: linux-build-lib

0 commit comments

Comments
 (0)