Skip to content

Commit

Permalink
Merge pull request #288 from materialsproject/ci_update
Browse files Browse the repository at this point in the history
change CI to include uv installation
  • Loading branch information
mattmcdermott committed Mar 8, 2024
2 parents 56e65b8 + b536ff3 commit fbfe269
Show file tree
Hide file tree
Showing 3 changed files with 338 additions and 15 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/release.yml
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
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

0 comments on commit fbfe269

Please sign in to comment.