Skip to content

Commit 7f8225e

Browse files
authored
Merge branch 'main' into fix/invalid_pod_id
2 parents d041e1b + 1ce9d85 commit 7f8225e

66 files changed

Lines changed: 6202 additions & 146 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/CD-publish_to_pypi.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ jobs:
4848

4949
steps:
5050
- name: Checkout code
51-
uses: actions/checkout@v4
51+
uses: actions/checkout@v5
5252
with:
5353
fetch-depth: 0
5454

5555
- name: Install uv
56-
uses: astral-sh/setup-uv@v6
56+
uses: astral-sh/setup-uv@v7
5757
with:
5858
enable-cache: true
5959

@@ -109,7 +109,7 @@ jobs:
109109
shell: bash
110110

111111
- name: Repository Dispatch
112-
uses: peter-evans/repository-dispatch@v3
112+
uses: peter-evans/repository-dispatch@v4
113113
with:
114114
token: ${{ secrets.RUNPOD_WORKERS_PAT }}
115115
repository: ${{ matrix.repo }}

.github/workflows/CD-test_publish_to_pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
id-token: write # Required for OIDC
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v6
22+
uses: astral-sh/setup-uv@v7
2323
with:
2424
enable-cache: true
2525

.github/workflows/CI-codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v5
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
45+
uses: github/codeql-action/init@v4
4646
with:
4747
languages: ${{ matrix.language }}
4848
queries: security-extended,security-and-quality
4949

5050
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5151
# If this step fails, then you should remove it and run the build manually (see below)
5252
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v3
53+
uses: github/codeql-action/autobuild@v4
5454

5555
# ℹ️ Command-line programs to run using the OS shell.
5656
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -63,6 +63,6 @@ jobs:
6363
# ./location_of_script_within_repo/buildscript.sh
6464

6565
- name: Perform CodeQL Analysis
66-
uses: github/codeql-action/analyze@v3
66+
uses: github/codeql-action/analyze@v4
6767
with:
6868
category: "/language:${{matrix.language}}"

.github/workflows/CI-e2e.yml

Lines changed: 23 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,38 @@
1-
# Performs a full test of the package within production environment.
2-
3-
name: CI | End-to-End Runpod Python Tests
4-
1+
name: CI-e2e
52
on:
63
push:
7-
branches:
8-
- main
9-
4+
branches: [main]
105
pull_request:
11-
branches:
12-
- main
13-
6+
branches: [main]
147
workflow_dispatch:
158

169
jobs:
17-
e2e-build:
18-
name: Build and push mock-worker Docker image
10+
e2e:
1911
if: github.repository == 'runpod/runpod-python'
2012
runs-on: ubuntu-latest
21-
outputs:
22-
docker_tag: ${{ steps.output_docker_tag.outputs.docker_tag }}
23-
13+
timeout-minutes: 15
2414
steps:
25-
- name: Checkout Repo
26-
uses: actions/checkout@v4
27-
with:
28-
fetch-depth: 2
15+
- uses: actions/checkout@v5
2916

30-
- name: Clone and patch mock-worker
31-
run: |
32-
git clone https://github.com/runpod-workers/mock-worker
33-
GIT_SHA=${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
34-
echo "git+https://github.com/runpod/runpod-python.git@$GIT_SHA" > mock-worker/builder/requirements.txt
35-
36-
- name: Set up QEMU
37-
uses: docker/setup-qemu-action@v3
38-
39-
- name: Set up Docker Buildx
40-
uses: docker/setup-buildx-action@v3
17+
- uses: astral-sh/setup-uv@v6
4118

42-
- name: Login to Docker Hub
43-
uses: docker/login-action@v3
19+
- uses: actions/setup-python@v5
4420
with:
45-
username: ${{ secrets.DOCKERHUB_USERNAME }}
46-
password: ${{ secrets.DOCKERHUB_TOKEN }}
21+
python-version: "3.12"
4722

48-
- name: Define Docker Tag
49-
id: docker_tag
23+
- name: Install dependencies
5024
run: |
51-
DOCKER_TAG=${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
52-
echo "DOCKER_TAG=$(echo $DOCKER_TAG | cut -c 1-7)" >> $GITHUB_ENV
53-
54-
- name: Set Docker Tag as Output
55-
id: output_docker_tag
56-
run: echo "docker_tag=${{ env.DOCKER_TAG }}" >> $GITHUB_OUTPUT
57-
58-
- name: Build and push Docker image
59-
uses: docker/build-push-action@v6
60-
with:
61-
context: ./mock-worker
62-
file: ./mock-worker/Dockerfile
63-
push: true
64-
tags: ${{ vars.DOCKERHUB_REPO }}/${{ vars.DOCKERHUB_IMG }}:${{ env.DOCKER_TAG }}
65-
cache-from: type=gha
66-
cache-to: type=gha,mode=max
67-
68-
test:
69-
name: Run End-to-End Tests
70-
runs-on: ubuntu-latest
71-
needs: [e2e-build]
72-
73-
steps:
74-
- uses: actions/checkout@v4
75-
76-
- name: Run Tests
77-
id: run-tests
78-
uses: runpod/runpod-test-runner@v2.1.0
79-
with:
80-
image-tag: ${{ vars.DOCKERHUB_REPO }}/${{ vars.DOCKERHUB_IMG }}:${{ needs.e2e-build.outputs.docker_tag }}
81-
runpod-api-key: ${{ secrets.RUNPOD_API_KEY }}
82-
request-timeout: 1200
83-
84-
- name: Verify Tests
85-
env:
86-
TOTAL_TESTS: ${{ steps.run-tests.outputs.total-tests }}
87-
SUCCESSFUL_TESTS: ${{ steps.run-tests.outputs.succeeded }}
25+
uv venv
26+
source .venv/bin/activate
27+
uv pip install -e ".[test]" --quiet || uv pip install -e .
28+
uv pip install runpod-flash pytest pytest-asyncio pytest-timeout pytest-rerunfailures httpx
29+
uv pip install -e . --reinstall --no-deps
30+
python -c "import runpod; print(f'runpod: {runpod.__version__} from {runpod.__file__}')"
31+
32+
- name: Run e2e tests
8833
run: |
89-
echo "Total tests: $TOTAL_TESTS"
90-
echo "Successful tests: $SUCCESSFUL_TESTS"
91-
if [ "$TOTAL_TESTS" != "$SUCCESSFUL_TESTS" ]; then
92-
exit 1
93-
fi
34+
source .venv/bin/activate
35+
pytest tests/e2e/ -v -p no:xdist --timeout=600 --reruns 1 --reruns-delay 5 --log-cli-level=INFO -o "addopts="
36+
env:
37+
RUNPOD_API_KEY: ${{ secrets.RUNPOD_API_KEY }}
38+
RUNPOD_SDK_GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

.github/workflows/CI-pytests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515
run_tests:
1616
strategy:
1717
matrix:
18-
python-version: [3.8, 3.9, 3.10.15, 3.11.10]
18+
python-version: ["3.10", "3.11", "3.12"]
1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323

2424
- name: Install uv
25-
uses: astral-sh/setup-uv@v6
25+
uses: astral-sh/setup-uv@v7
2626
with:
2727
enable-cache: true
2828

.github/workflows/vhs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
vhs:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414

1515
- name: Install uv
16-
uses: astral-sh/setup-uv@v6
16+
uses: astral-sh/setup-uv@v7
1717
with:
1818
enable-cache: true
1919

@@ -39,7 +39,7 @@ jobs:
3939
path: ".github/tape_collection/cli_ssh.tape"
4040

4141
# Add gifs to commit
42-
- uses: stefanzweifel/git-auto-commit-action@v6
42+
- uses: stefanzweifel/git-auto-commit-action@v7
4343
env:
4444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4545
with:

0 commit comments

Comments
 (0)