From 315548fa64b9a95988c762a10144417eaf0b7f0c Mon Sep 17 00:00:00 2001 From: Mengxin Zhu <843303+zxkane@users.noreply.github.com> Date: Wed, 9 Apr 2025 00:26:21 +0800 Subject: [PATCH 1/3] ci: add GitHub Actions workflow for Python testing --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7fc7b01 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + env: + QUIP_TOKEN: ${{ secrets.QUIP_TOKEN }} + QUIP_BASE_URL: ${{ secrets.QUIP_BASE_URL }} + TEST_THREAD_ID: ${{ secrets.TEST_THREAD_ID }} + TEST_SHEET_NAME: ${{ secrets.TEST_SHEET_NAME }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install uv + run: | + curl -Ls https://astral.sh/uv/install.sh | sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Install dependencies + run: uv pip install --system --no-cache-dir + + - name: Run unit tests + run: pytest tests + + - name: Run e2e tests + run: pytest tests/e2e From 03ce1df89f78ef9540ea4086df7ab47b7b82efbd Mon Sep 17 00:00:00 2001 From: Mengxin Zhu <843303+zxkane@users.noreply.github.com> Date: Wed, 9 Apr 2025 00:36:04 +0800 Subject: [PATCH 2/3] fix: update CI workflow for compatibility and debugging --- .github/workflows/ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fc7b01..e0b8683 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,13 +23,19 @@ jobs: with: python-version: '3.11' - - name: Install uv - run: | - curl -Ls https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH + - name: Upgrade pip + run: python -m pip install --upgrade pip + + - name: Install project dependencies + run: pip install . - - name: Install dependencies - run: uv pip install --system --no-cache-dir + - name: Install pytest + run: pip install pytest + + - name: Show Python version and installed packages + run: | + python --version + pip list - name: Run unit tests run: pytest tests From 6764bb16d88e08627f91b182b483a97c1575b7f2 Mon Sep 17 00:00:00 2001 From: Mengxin Zhu <843303+zxkane@users.noreply.github.com> Date: Wed, 9 Apr 2025 00:39:52 +0800 Subject: [PATCH 3/3] fix: update Python version to 3.12 in CI workflow --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0b8683..c94cc43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Upgrade pip run: python -m pip install --upgrade pip