Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change CI to include uv installation #288

Merged
merged 7 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ jobs:
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install pypa/build
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install build --user
pip install --upgrade pip
pip install uv

- name: Activate virtualenv
run: |
uv venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV

- name: Install python dependencies
run: |
uv pip install -e .[strict,tests]

- name: Build a binary wheel and a source tarball
run: |
Expand All @@ -48,15 +58,25 @@ jobs:
with:
python-version: "3.11"

- name: Install uv
run: |
pip install --upgrade pip
pip install uv

- name: Activate virtualenv
run: |
uv venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[strict,docs]
pip install auto-changelog
uv pip install -e .[strict,docs]
uv pip install auto-changelog

- name: Generate changelog
run: |
auto-changelog --tag-prefix "v"
auto-changelog -u --tag-prefix "v"

- name: Commit files
env:
Expand Down
44 changes: 38 additions & 6 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,20 @@ jobs:
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
- name: Install uv
run: |
pip install --upgrade ruff mypy
pip install --upgrade pip
pip install uv

- name: Activate virtualenv
run: |
uv venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV

- name: Install python dependencies
run: |
uv pip install --upgrade ruff mypy

- name: ruff
run: |
Expand Down Expand Up @@ -54,15 +65,26 @@ jobs:
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install uv
run: |
pip install --upgrade pip
pip install uv

- name: Activate virtualenv
run: |
uv venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[strict,tests]
uv pip install -e .[strict,tests]

- name: Test with pytest
env:
MP_API_KEY: ${{ secrets.MP_API_KEY }}
run: |
. .venv/bin/activate
pytest --cov=src/rxn_network --cov-report=xml

- uses: codecov/codecov-action@v3.1.1
Expand All @@ -85,10 +107,20 @@ jobs:
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install uv
run: |
pip install --upgrade pip
pip install uv

- name: Activate virtualenv
run: |
uv venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[strict,docs]
uv pip install -e .[strict,docs]

- name: Build
run: sphinx-build docs docs_build
Loading
Loading