mirror of
https://github.com/blazickjp/arxiv-mcp-server.git
synced 2025-07-25 20:38:49 +03:00
Update tests yml
This commit is contained in:
69
.github/workflows/tests.yaml
vendored
69
.github/workflows/tests.yaml
vendored
@@ -1,69 +0,0 @@
|
||||
name: Run Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main] # or master, depending on your default branch
|
||||
push:
|
||||
branches: [main] # optional: also run on pushes to main
|
||||
|
||||
jobs:
|
||||
test-ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv pip install pytest
|
||||
uv pip install -e .
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest
|
||||
|
||||
test-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Install uv
|
||||
run: |
|
||||
iwr https://astral.sh/uv/install.ps1 -useb | iex
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv pip install pytest
|
||||
uv pip install -e .
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest
|
||||
|
||||
test-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv pip install pytest
|
||||
uv pip install -e .
|
||||
- name: Run tests
|
||||
run: |
|
||||
pytest
|
||||
52
.github/workflows/tests.yml
vendored
Normal file
52
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Run Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.11", "3.12"]
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install uv (Linux/macOS)
|
||||
if: runner.os != 'Windows'
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install uv (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
# Install uv
|
||||
iwr -useb https://astral.sh/uv/install.ps1 | iex
|
||||
# Add uv to PATH
|
||||
echo "$HOME\.uv\bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv pip install --system pytest pytest-cov
|
||||
uv pip install --system -e ".[test]"
|
||||
# If you don't have a [test] extra, use:
|
||||
# uv pip install --system -r requirements-test.txt
|
||||
# or just:
|
||||
# uv pip install --system -e .
|
||||
|
||||
- name: Run tests with pytest
|
||||
run: |
|
||||
pytest --cov=./ --cov-report=xml
|
||||
Reference in New Issue
Block a user