-
Notifications
You must be signed in to change notification settings - Fork 1.4k
74 lines (70 loc) · 1.83 KB
/
pytest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Pytest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches:
- main
- prepare-public2
paths-ignore:
- 'docs/**'
- 'README.md'
- 'mkdocs.yml'
pull_request:
branches:
- main
- prepare-public2
paths-ignore:
- 'docs/**'
- 'README.md'
- 'mkdocs.yml'
# Not possible to test windows capability:
# https://github.com/orgs/community/discussions/25491
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Pull swe-agent docker container
run: |
docker pull sweagent/swe-agent:latest
- name: Pull enigma docker container
run: |
docker pull sweagent/enigma:latest
- name: Set up network for CTF challenges
run: |
docker network create ctfnet
- name: Create keys.cfg
run: |
touch keys.cfg
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
uv pip install --python ${Python_ROOT_DIR} '.[dev]'
- name: Run pytest
uses: sjvrijn/pytest-last-failed@v2
with:
pytest-args: '--cov'
- name: Upload logs & trajectories
uses: actions/upload-artifact@v4
if: always()
with:
name: trajectories
path: |
trajectories/runner/
- name: Explicitly convert coverage to xml
run: coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: princeton-nlp/SWE-agent