Skip to content

Commit

Permalink
Tailor CI to our purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
toshok committed Sep 23, 2024
1 parent 8cb45c2 commit 3aa0068
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 120 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/build-docs.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/check-links.yaml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/pyright.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

name: Pyright

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- 'README.md'
- 'mkdocs.yml'
pull_request:
branches:
- main
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.10'
- name: Create keys.cfg
run: |
touch keys.cfg
- name: Install rye
run: |
curl -LsSf https://astral.sh/rye/install.sh | sh
- name: Install dependencies
run: |
rye sync
- name: Typecheck replayio code
run: |
rye run replayio-typecheck
22 changes: 7 additions & 15 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,19 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'
- name: Pull swe-agent docker container
run: |
docker pull sweagent/swe-agent:latest
- name: Create keys.cfg
run: |
touch keys.cfg
- name: Install uv
- name: Install rye
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf https://astral.sh/rye/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: '--exitfirst --cov'
- 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
rye sync
- name: Run replayio tests
run: |
rye run replayio-tests
24 changes: 0 additions & 24 deletions .github/workflows/release-dockerhub-nightly.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/release-dockerhub-release.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,5 @@ aci = "aci"
required-imports = ["from __future__ import annotations"]

[tool.rye.scripts]
replayio-tests = "pytest -m replayio"
replayio-tests = "pytest -m replayio"
replayio-typecheck = "pyright tdd/**/*.py sweagent/investigations/**/*.py"

0 comments on commit 3aa0068

Please sign in to comment.