Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Add CI with github actions

Kilian Lierete44847f25822
diff --git a/.github/workflows/ci_no_llm.yaml b/.github/workflows/ci_no_llm.yaml
new file mode 100644
index 00000000..9f4535f8
--- /dev/null
+++ b/.github/workflows/ci_no_llm.yaml
@@ -0,0 +1,38 @@
+
+name: Tests (no LLM)
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ setup_job:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ shell: bash -l {0}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ - name: Setup Miniconda
+ uses: conda-incubator/setup-miniconda@v2
+ with:
+ miniconda-version: "latest"
+ architecture: x64
+ activate-environment: swe-agent
+ environment-file: environment.yml
+ - name: Run setup script and create keys.cfg
+ run: |
+ ./setup.sh
+ touch keys.cfg
+ shell: bash
+ - name: Install test dependencies
+ run: |
+ pip install pytest
+ - name: Run pytest
+ run: |
+ pytest
\ No newline at end of file
diff --git a/sweagent/environment/swe_env.py b/sweagent/environment/swe_env.py
index ef2a2c01..80ea727f 100644
--- a/sweagent/environment/swe_env.py
+++ b/sweagent/environment/swe_env.py
@@ -95,7 +95,7 @@ class SWEEnv(gym.Env):
os.path.join(os.getcwd(), "keys.cfg")
):
self.cfg = config.Config(os.path.join(os.getcwd(), "keys.cfg"))
- self.token = self.cfg.get("GITHUB_TOKEN", "git")
+ self.token = self.cfg.get("GITHUB_TOKEN", None)
# Load Task Instances
self.data_path = self.args.data_path