Skip to content

Commit

Permalink
more nicer gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nimish committed Apr 27, 2024
1 parent 947e2d2 commit 7ceec01
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
conda config --set always_yes yes --set auto_update_conda false
conda install conda=24.1.2
conda install -n base conda-libmamba-solver
conda install python=3.12 conda-build colorama pip ruamel ruamel.yaml rich jsonschema -c conda-forge
pip install -e .
conda install python=3.12 conda-build colorama pip ruamel ruamel.yaml rich jsonschema uv -c conda-forge
uv pip install -e .
# echo yes before login to prevent anaconda bug breaking automation
# git tags MUST be fetched otherwise output will be blank
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
jobs:
build-pypi:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -15,7 +18,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: ${{ matrix.python-version }}

- name: Install Twine
run: sudo pip install twine
Expand All @@ -27,6 +30,9 @@ jobs:
build-conda:
runs-on: ubuntu-latest
# sets default shell to remove need for source to run the conda shell
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}
Expand All @@ -39,7 +45,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: ${{ matrix.python-version }}

# Much better than manual installation, original version Miniconda2-4.7.10-Linux-x86_64.sh is broken
- name: Install Miniconda
Expand All @@ -52,11 +58,11 @@ jobs:
- name: Install the Conda Dependencies
run: |
conda config --set always_yes yes --set auto_update_conda false
conda install conda=24.1.2
conda install conda>=24.1.2
conda install -n base conda-libmamba-solver
conda install python=3.12 conda-build colorama pip ruamel ruamel.yaml rich jsonschema -c conda-forge
git fetch --prune --unshallow --tags
pip install -e .
conda install python=${{matrix.python-version}} conda-build colorama pip ruamel ruamel.yaml rich jsonschema uv -c conda-forge
tag_ver=$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-)
VERSION_FROM_GIT_TAG="${tag_ver}test" uv pip install -e .
# echo yes before login to prevent anaconda bug breaking automation
# git tags MUST be fetched otherwise output will be blank
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install --system --break-system-packages -r requirements.txt
uv pip install --system --break-system-packages pytest pytest-cov pytest-github-report
uv pip install --system --break-system-packages pytest pytest-cov pytest-github-report pytest-github-actions-annotate-failures
- name: Run Unit Tests
env:
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.analysis.typeCheckingMode": "basic"
}

0 comments on commit 7ceec01

Please sign in to comment.