Skip to content

Commit 9243bd6

Browse files
committed
initial release
0 parents  commit 9243bd6

70 files changed

Lines changed: 29108 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pypi.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
name: Build
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.x"
17+
18+
- name: Install pypa/build
19+
run: python3 -m pip install build --user
20+
21+
- name: Build a binary wheel and a source tarball
22+
run: python3 -m build . --outdir dist/
23+
24+
- name: Store the distribution packages
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: python-package-distributions
28+
path: dist/
29+
30+
publish-to-pypi:
31+
name: Publish to PyPI
32+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
33+
needs:
34+
- build
35+
runs-on: ubuntu-latest
36+
environment: pypi
37+
permissions:
38+
id-token: write # IMPORTANT: mandatory for trusted publishing
39+
40+
steps:
41+
- name: Download all the distribution packages
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: python-package-distributions
45+
path: dist/
46+
47+
- name: Publish all distribution packages to PyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1
49+
50+
github-release:
51+
name: Sign with Sigstore and upload them to GitHub Release
52+
needs:
53+
- publish-to-pypi
54+
runs-on: ubuntu-latest
55+
permissions:
56+
contents: write # IMPORTANT: mandatory for making GitHub Releases
57+
id-token: write # IMPORTANT: mandatory for sigstore
58+
59+
steps:
60+
- name: Download all the dists
61+
uses: actions/download-artifact@v4
62+
with:
63+
name: python-package-distributions
64+
path: dist/
65+
66+
- name: Sign the dists with Sigstore
67+
uses: sigstore/gh-action-sigstore-python@v1.2.3
68+
with:
69+
inputs: >-
70+
./dist/*.tar.gz
71+
./dist/*.whl
72+
73+
- name: Create GitHub Release
74+
env:
75+
GITHUB_TOKEN: ${{ github.token }}
76+
run: >-
77+
gh release create
78+
'${{ github.ref_name }}'
79+
--repo '${{ github.repository }}'
80+
--notes ""
81+
82+
- name: Upload artifact signatures to GitHub Release
83+
env:
84+
GITHUB_TOKEN: ${{ github.token }}
85+
# Upload to GitHub Release using the `gh` CLI.
86+
# `dist/` contains the built packages, and the
87+
# sigstore-produced signatures and certificates.
88+
run: >-
89+
gh release upload
90+
'${{ github.ref_name }}' dist/**
91+
--repo '${{ github.repository }}'
92+
93+
# publish-to-testpypi:
94+
# name: Publish to TestPyPI
95+
# needs:
96+
# - build
97+
# runs-on: ubuntu-latest
98+
# environment: testpypi
99+
# permissions:
100+
# id-token: write # IMPORTANT: mandatory for trusted publishing
101+
102+
# steps:
103+
# - name: Download all the distribution packages
104+
# uses: actions/download-artifact@v4
105+
# with:
106+
# name: python-package-distributions
107+
# path: dist/
108+
109+
# - name: Publish distribution packages to TestPyPI
110+
# uses: pypa/gh-action-pypi-publish@release/v1
111+
# with:
112+
# repository-url: https://test.pypi.org/legacy/

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<img src="./banner.png" />
2+
3+
`WorkArena` is a suite of browser-based tasks designed for ServiceNow products, acting as a benchmark for automating commonly conducted activities within the product environment.
4+
5+
## Setup
6+
7+
### ServiceNow Instance
8+
9+
1. Go to https://developer.servicenow.com/ and create an account
10+
2. Request a Utah developer instance (initializing it might take a while)
11+
3. Log into your ServiceNow instance via the browser and change the admin password if instructed to do so. If you're already registered in the instance, you can find the instance information (Username, Password, instance URL) in the `My Instances` section of your developer account.
12+
4. Set the following environment variables:
13+
* `SNOW_INSTANCE_URL`: URL of your ServiceNow developer instance
14+
* `SNOW_INSTANCE_UNAME`: username for your instance (usually `admin`)
15+
* `SNOW_INSTANCE_PWD`: password for your instance (you'll receive this by email and you can get it from your ServiceNow developer account)
16+
17+
To set environment variables in Bash, you can use the `export` command. Here's an example:
18+
19+
```
20+
export SNOW_INSTANCE_URL="https://your-instance-url.service-now.com"
21+
export SNOW_INSTANCE_UNAME="your-username"
22+
export SNOW_INSTANCE_PWD="your-password"
23+
```
24+
25+
Another option is to add the environment variables to your conda environment. To do this, you can execute the following command :
26+
27+
```
28+
conda env config vars set ENV_VAR=VALUE
29+
```
30+
31+
### Install Data
32+
33+
Run the following code to install all the data shipped with the benchmark:
34+
35+
```
36+
from browsergym.workarena.install import setup
37+
setup()
38+
```
39+
40+
### Finally
41+
42+
1. Run `pytest -v .` to make sure that your setup works.

banner.png

905 KB
Loading

0 commit comments

Comments
 (0)