-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Test on more versions of Python #563
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
723f134
Add Python versions from 3.8 to the GHA test matrix
maresb e1a1508
Improve error message for missing conda-recipe-manager
maresb 6c2584d
Remove conda-recipe-manager from environment.yml
maresb ebeb14e
Enable new-style type annotations for py<3.10
maresb 70b0d06
Apply ruff fixes
maresb 4f51cb5
Split double context manager call
maresb 55170ba
Switch to setup-micromamba
maresb 137d60c
Install conda-recipe-manager in CI if possible
maresb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,35 +8,51 @@ on: | |
branches: | ||
- "*" | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
py_ver: ["3.11", "3.12"] | ||
py_ver: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.py_ver }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: conda-incubator/setup-[email protected] | ||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
auto-update-conda: true | ||
channels: conda-forge,defaults | ||
channel-priority: true | ||
python-version: ${{ matrix.py_ver }} | ||
#### | ||
# https://github.com/mamba-org/setup-micromamba/issues/225 | ||
micromamba-version: 1.5.10-0 | ||
micromamba-binary-path: /home/runner/micromamba-bin-versioned/micromamba | ||
#### | ||
environment-file: environment.yaml | ||
activate-environment: gs | ||
# Added an extra python to the create-args in order to bust the cache: | ||
create-args: >- | ||
python=${{ matrix.py_ver }} | ||
python | ||
cache-environment: true | ||
- name: Install conda-recipe-manager if possible | ||
# Possible when the Python version is >=3.11 | ||
run: | | ||
if [ $(python -c "import sys; print(sys.version_info[:2] >= (3,11))") = "True" ]; then | ||
echo "Installing conda-recipe-manager" | ||
micromamba install -y -c conda-forge conda-recipe-manager | ||
else | ||
echo "Skipping conda-recipe-manager installation" | ||
fi | ||
- name: Conda info | ||
shell: bash -l {0} | ||
run: | | ||
conda info --all | ||
conda list | ||
|
||
- name: Running doctests | ||
shell: bash -l {0} | ||
run: | | ||
pytest grayskull \ | ||
-vv \ | ||
|
@@ -51,7 +67,6 @@ jobs: | |
--junit-prefix=Linux-py${{ matrix.py_ver }}-serial | ||
|
||
- name: Running serial tests | ||
shell: bash -l {0} | ||
run: | | ||
pytest tests \ | ||
-vv \ | ||
|
@@ -67,7 +82,6 @@ jobs: | |
--junit-prefix=Linux-py${{ matrix.py_ver }}-serial | ||
|
||
- name: Running parallel tests | ||
shell: bash -l {0} | ||
run: | | ||
pytest tests \ | ||
-vv \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,3 @@ dependencies: | |
- libcblas | ||
- beautifulsoup4 | ||
- semver >=3.0.0,<4.0.0 | ||
- conda-recipe-manager >=0.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from __future__ import annotations | ||
|
||
import re | ||
from abc import ABC | ||
from pathlib import Path | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns Note