Skip to content

Commit

Permalink
Donot run docs, benchmarks and stardis tests on draft PRs. (tardis-sn…
Browse files Browse the repository at this point in the history
…#2761)

* Add ready to review to run tests

* Add if condition to check PR status

* Running stardis tests only on push to master

* Removing osx-64 from workflows
  • Loading branch information
KasukabeDefenceForce authored Aug 1, 2024
1 parent c57d74d commit 642e191
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- reopened
- synchronize
- labeled # benchmarks label required
- ready_for_review
workflow_dispatch:

env:
Expand All @@ -31,6 +32,7 @@ jobs:
build:
if: github.repository_owner == 'tardis-sn' &&
(github.event_name == 'push' ||
(!github.event.pull_request.draft) ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request_target' &&
contains(github.event.pull_request.labels.*.name, 'benchmarks')))
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
- reopened
- synchronize
- labeled # requires the `build-docs` label
- ready_for_review

workflow_dispatch: # manual trigger

Expand All @@ -37,6 +38,7 @@ defaults:
jobs:
check-for-changes:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
outputs:
trigger-check-outcome: ${{ steps.trigger_check.outcome }}
docs-check-outcome: ${{ steps.docs_check.outcome }}
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/stardis-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ name: stardis-tests
on:
push:
branches:
- '*'
- master

pull_request:
branches:
- '*'

types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:

defaults:
Expand All @@ -22,18 +27,15 @@ jobs:
build:
strategy:
matrix:
label: [osx-64, linux-64]
label: [linux-64]
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/stardis

- os: macos-latest
label: osx-64
prefix: /Users/runner/miniconda3/envs/stardis

name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 642e191

Please sign in to comment.