Skip to content

Commit cb84bd6

Browse files
committed
New workflow
1 parent 3247cd8 commit cb84bd6

File tree

2 files changed

+79
-44
lines changed

2 files changed

+79
-44
lines changed

.github/workflows/python-package.yml

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,66 +5,31 @@ on:
55
branches: ["main", "development"]
66
pull_request:
77
branches: ["main", "development"]
8-
workflow_dispatch: # Allow manual triggering
8+
workflow_dispatch:
99

1010
jobs:
1111
test:
12-
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
12+
name: Test on ${{ matrix.os }}
1313
runs-on: ${{ matrix.os }}
1414
strategy:
15-
fail-fast: false # Don't cancel other jobs if one fails
15+
fail-fast: true
1616
matrix:
1717
os: [ubuntu-latest, windows-latest, macos-latest]
18-
python-version: ["3.10", "3.12"]
1918

2019
steps:
2120
- uses: actions/checkout@v4
2221
with:
23-
fetch-depth: 0 # Fetch all history for proper versioning
24-
25-
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v4
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
cache: 'pip' # Cache pip dependencies
30-
31-
- name: Install poetry
32-
shell: bash
33-
run: |
34-
python -m pip install --upgrade pip
35-
pip install poetry
36-
37-
- name: Configure poetry
38-
shell: bash
39-
run: |
40-
poetry config virtualenvs.create true
41-
poetry config virtualenvs.in-project true
42-
43-
- name: Cache poetry dependencies
44-
uses: actions/cache@v3
45-
with:
46-
path: ./.venv
47-
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
48-
49-
- name: Install dependencies
22+
fetch-depth: 0
23+
24+
- name: Install Open Interpreter
5025
shell: bash
5126
run: |
52-
poetry install --no-interaction --all-extras
27+
curl https://raw.githubusercontent.com/OpenInterpreter/open-interpreter/refs/heads/development/installers/new-installer.sh | sh
5328
5429
- name: Run tests
5530
shell: bash
5631
run: |
57-
poetry run pytest tests/ -v --color=yes
32+
interpreter run tests/ -v --color=yes
5833
env:
5934
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
60-
PYTHONUNBUFFERED: "1" # For real-time test output
61-
62-
- name: Upload test results
63-
if: always() # Run even if tests fail
64-
uses: actions/upload-artifact@v3
65-
with:
66-
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
67-
path: |
68-
.pytest_cache
69-
pytest-report.xml
70-
if-no-files-found: ignore
35+
PYTHONUNBUFFERED: "1"

archive/classic_workflow.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: ["main", "development"]
6+
pull_request:
7+
branches: ["main", "development"]
8+
workflow_dispatch: # Allow manual triggering
9+
10+
jobs:
11+
test:
12+
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false # Don't cancel other jobs if one fails
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
python-version: ["3.10", "3.12"]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0 # Fetch all history for proper versioning
24+
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
cache: 'pip' # Cache pip dependencies
30+
31+
- name: Install poetry
32+
shell: bash
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install poetry
36+
37+
- name: Configure poetry
38+
shell: bash
39+
run: |
40+
poetry config virtualenvs.create true
41+
poetry config virtualenvs.in-project true
42+
43+
- name: Cache poetry dependencies
44+
uses: actions/cache@v3
45+
with:
46+
path: ./.venv
47+
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
48+
49+
- name: Install dependencies
50+
shell: bash
51+
run: |
52+
poetry install --no-interaction --all-extras
53+
54+
- name: Run tests
55+
shell: bash
56+
run: |
57+
poetry run pytest tests/ -v --color=yes
58+
env:
59+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
60+
PYTHONUNBUFFERED: "1" # For real-time test output
61+
62+
- name: Upload test results
63+
if: always() # Run even if tests fail
64+
uses: actions/upload-artifact@v3
65+
with:
66+
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
67+
path: |
68+
.pytest_cache
69+
pytest-report.xml
70+
if-no-files-found: ignore

0 commit comments

Comments
 (0)