Skip to content

Commit a0dcb56

Browse files
Update unit_tests.yml
1 parent f355c8a commit a0dcb56

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/unit_tests.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@ on:
77
pull_request:
88
schedule:
99
- cron: '59 23 * * SUN' # Runs at midnight on Sunday
10+
repository_dispatch:
11+
types: [dependency-update]
12+
workflow_call:
13+
inputs:
14+
run_fast_tests_only:
15+
description: 'Run only fast tests'
16+
required: false
17+
type: boolean
18+
default: false
1019

1120
jobs:
12-
1321
code-format:
1422
runs-on: ubuntu-latest
1523
defaults:
@@ -71,6 +79,7 @@ jobs:
7179
run: pytest -n 5 --durations=10 -m 'not slow and not pricy' --slowmo 1000 -v tests
7280

7381
browsergym-workarena-slow:
82+
if: ${{ !inputs.run_fast_tests_only }}
7483
runs-on: ubuntu-latest
7584

7685
defaults:
@@ -106,8 +115,9 @@ jobs:
106115
run: pytest -n 5 --durations=10 -m 'slow and not pricy' --slowmo 1000 -v tests
107116

108117
end-to-end-tests:
118+
# Runs on the schedule (once a week on a Sunday) OR if browsergym has had a commit to main
119+
if: ${{ !inputs.run_fast_tests_only && (github.event_name == 'schedule' || github.event_name == 'repository_dispatch') }}
109120
runs-on: ubuntu-latest
110-
if: github.event_name == 'schedule'
111121
defaults:
112122
run:
113123
shell: bash -l {0}

0 commit comments

Comments
 (0)