Skip to content

Commit

Permalink
update package workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kazewong committed Oct 16, 2024
1 parent 5849660 commit cfde5e3
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

name: Python package

on: [push, pull_request]
on: [push]

jobs:
build:
Expand All @@ -14,18 +14,22 @@ jobs:
matrix:
python-version: ["3.10", "3.11"]


steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install .
- name: Test with pytest
run: |
pytest
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install the project
run: uv sync --all-extras --dev

- name: Run tests
# For example, using `pytest`
run: uv run pytest

- name: Run build
run: uv build
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies = [
"gwpy>=3.0.10",
"jax>=0.4.34",
"jaxtyping>=0.2.34",
"pytest>=8.3.3",
"ripplegw>=0.0.9",
"typed-argument-parser>=1.10.1",
]
Expand Down
37 changes: 37 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cfde5e3

Please sign in to comment.