Skip to content
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

add call to WorkArena tests in browsergym PRs + on a schedule #161

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
64 changes: 64 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,3 +410,67 @@ jobs:
OPENAI_API_KEY: ""
run: |
pytest -n 5 --durations=10 -m 'not pricy' --slowmo 1000 -v tests/assistantbench

workarena-fast:
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
steps:
- name: Checkout Dependency Repo
uses: actions/checkout@v4

- name: Checkout WorkArena
uses: actions/checkout@v4
with:
repository: ServiceNow/WorkArena
ref: workarena-plus-plus
path: WorkArena

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'

- name: Install dependencies
working-directory: WorkArena/dev
run: pip install -r requirements.txt

- name: Install Playwright
run: playwright install --with-deps

- name: Run fast tests
working-directory: WorkArena
env:
SNOW_INSTANCE_URL: ${{ secrets.SNOW_INSTANCE_URL }}
SNOW_INSTANCE_UNAME: ${{ secrets.SNOW_INSTANCE_UNAME }}
SNOW_INSTANCE_PWD: ${{ secrets.SNOW_INSTANCE_PWD }}
run: pytest -n 5 --durations=10 -m 'not slow and not pricy' --slowmo 1000 -v tests

scheduled-workarena-slow:
if: github.event_name == 'schedule'
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Check for recent merge to main
id: check-merge
run: |
LAST_COMMIT_DATE=$(git log -1 --format=%ct)
CURRENT_DATE=$(date +%s)
DIFF=$((CURRENT_DATE - LAST_COMMIT_DATE))
if [ $DIFF -le 86400 ]; then
echo "recent_merge=true" >> $GITHUB_OUTPUT
else
echo "recent_merge=false" >> $GITHUB_OUTPUT
fi

- name: WorkArena slow tests
if: steps.check-merge.outputs.recent_merge == 'true'
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PAT }}
repository: ServiceNow/WorkArena
event-type: dependency-update
Loading