Skip to content

Commit

Permalink
Merge pull request #6 from xdslproject/alexarice/ci
Browse files Browse the repository at this point in the history
Fix ci

Fixes #5
  • Loading branch information
alexarice authored Oct 22, 2024
2 parents 53f7c33 + 490b3ac commit 0c92224
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 33 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/ci.core.yml → .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --dev
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

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

- name: Test with pytest
run: |
Expand Down
36 changes: 21 additions & 15 deletions .github/workflows/ci-pyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,24 @@ jobs:
PYRIGHT_VERSION: 1.0

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip
- name: Install the package
run: |
pip install .[dev]
- name: Pyright
uses: jakebailey/pyright-action@v1
with:
version: "1.1.309"
- uses: actions/checkout@v3

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

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

- name: Install project and activate virtual environment
run: |
uv sync --all-extras
source .venv/bin/activate
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: Pyright
uses: jakebailey/pyright-action@v2
with:
version: PATH
18 changes: 7 additions & 11 deletions .github/workflows/code-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
cache-dependency-path: |
setup.py
requirements.txt
- name: Upgrade pip
run: |
pip install --upgrade pip
enable-cache: true
cache-dependency-glob: "uv.lock"

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

- name: Run code formatting checks with pre-commit
uses: pre-commit/[email protected]

0 comments on commit 0c92224

Please sign in to comment.