Make transformer lazy import (#292) #869
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| agentlab: | |
| runs-on: ubuntu-22.04 | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Git user | |
| run: git config --global user.email "[email protected]" && git config --global user.name "GitHub Actions" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.11 | |
| - name: Install AgentLab | |
| run: uv sync --frozen --extra dev | |
| - name: List packages | |
| run: uv pip list | |
| - name: Install Playwright | |
| run: uv run playwright install chromium --with-deps | |
| - name: Download WebArena / VisualWebArena ressource files | |
| run: uv run python -c 'import nltk; nltk.download("punkt_tab")' | |
| - name: Fetch MiniWob | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: "Farama-Foundation/miniwob-plusplus" | |
| ref: "7fd85d71a4b60325c6585396ec4f48377d049838" | |
| path: "miniwob-plusplus" | |
| - name: Serve MiniWob | |
| uses: Eun/http-server-action@v1 | |
| with: | |
| directory: "${{ github.workspace }}/miniwob-plusplus/miniwob/html" | |
| port: 8080 | |
| # Step to check if MiniWob is reachable | |
| - name: Check MiniWob availability | |
| run: curl -I "http://localhost:8080/miniwob/" || echo "MiniWob not reachable" | |
| - name: Pre-download nltk ressources | |
| run: uv run python -c "import nltk; nltk.download('punkt_tab')" | |
| - name: Run AgentLab Unit Tests | |
| env: | |
| MINIWOB_URL: "http://localhost:8080/miniwob/" | |
| run: uv run pytest -n 5 --durations=10 -m 'not pricy' -v tests/ |