Skip to content

Commit

Permalink
Support manual trigger for extended tests
Browse files Browse the repository at this point in the history
  • Loading branch information
buraksenn authored and alamb committed Jan 29, 2025
1 parent a93b4de commit e7a533b
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,38 @@ on:
push:
branches:
- main
issue_comment:
types: [created]

permissions:
pull-requests: write

jobs:
# Check issue comment and notify that extended tests are running
check_issue_comment:
name: Check issue comment
runs-on: ubuntu-latest
if: github.event.issue.pull_request && github.event.comment.body == 'run extended tests'
steps:
- uses: actions/github-script@v7
with:
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..."
})
# 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
- name: Setup Rust toolchain
Expand All @@ -55,6 +79,9 @@ jobs:
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:
Expand All @@ -75,6 +102,9 @@ jobs:
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:
Expand All @@ -94,6 +124,9 @@ jobs:
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:
Expand All @@ -105,3 +138,49 @@ jobs:
rust-version: stable
- name: Run sqllogictest
run: cargo test --profile release-nonlto --test sqllogictests -- --include-sqlite

notify_if_run_on_pr_success:
name: Notify
runs-on: ubuntu-latest
needs:
[
linux-test-extended,
hash-collisions,
sqllogictest-sqlite,
check_issue_comment,
]
if: success()
steps:
- uses: actions/github-script@v7
with:
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."
})
notify_if_run_on_pr_failure:
name: Notify
runs-on: ubuntu-latest
needs:
[
linux-test-extended,
hash-collisions,
sqllogictest-sqlite,
check_issue_comment,
]
if: failure()
steps:
- uses: actions/github-script@v7
with:
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."
})

0 comments on commit e7a533b

Please sign in to comment.