Skip to content

Commit

Permalink
CI: 1) enable MacOS pytest, 2) enable benchmark if the workflow was t…
Browse files Browse the repository at this point in the history
…riggered by a tag push event
  • Loading branch information
deedy5 committed May 1, 2024
1 parent 586bd32 commit 4a25154
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ jobs:
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist
#- name: pytest
# if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
# shell: bash
# run: |
# set -e
# pip install pyreqwest_impersonate --no-index --find-links dist --force-reinstall
# pip install pytest
# pytest
- name: pytest
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
shell: bash
run: |
set -e
pip install pyreqwest_impersonate --find-links dist --force-reinstall
pip install pytest
pytest
sdist:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -176,6 +176,8 @@ jobs:
permissions:
contents: write
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [release]
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -184,6 +186,7 @@ jobs:
python-version: '3.10'
- name: Install dependencies
run: |
sleep 30 # Wait for the package to be available on PyPI
python -m pip install --upgrade pip
pip install -r benchmark/requirements.txt
- name: Start Uvicorn server
Expand All @@ -193,7 +196,6 @@ jobs:
- name: Run benchmark
run: python benchmark/benchmark.py
- name: Generate image and commit
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
run: |
python benchmark/generate_image.py
git config --global user.name 'GitHub Actions'
Expand Down

0 comments on commit 4a25154

Please sign in to comment.