From 7ceec013fafd42c2ff21eeeef77d18a491702a90 Mon Sep 17 00:00:00 2001 From: Nimish Telang Date: Sat, 27 Apr 2024 12:47:02 -0400 Subject: [PATCH] more nicer gh actions --- .github/workflows/{build.yml => release.yml} | 4 ++-- .github/workflows/test-build.yml | 18 ++++++++++++------ .github/workflows/test.yml | 2 +- .vscode/settings.json | 3 +++ 4 files changed, 18 insertions(+), 9 deletions(-) rename .github/workflows/{build.yml => release.yml} (97%) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/build.yml b/.github/workflows/release.yml similarity index 97% rename from .github/workflows/build.yml rename to .github/workflows/release.yml index d15671f0..a91d7c83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 4b870d6d..de4ceef7 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -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 @@ -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 @@ -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} @@ -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 @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c358300..98cca7d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..12901f99 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.analysis.typeCheckingMode": "basic" +}