Skip to content

Commit

Permalink
.github/workflows/master.yml: don't run with 3.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
zachetienne committed Apr 16, 2024
1 parent 3940890 commit 540d4ed
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ jobs:
strategy:
matrix:
os: ['ubuntu-20.04', 'ubuntu-22.04']
python-version: ['3.6.7', '3.7.13', '3.8.18', '3.9.19', '3.x']
exclude:
- os: 'ubuntu-22.04'
python-version: '3.6.7'
python-version: ['3.7.13', '3.8.18', '3.9.19', '3.x']

steps:
- uses: actions/checkout@v4
Expand All @@ -36,7 +33,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -U -r requirements.txt
if [[ "${{ matrix.python-version }}" != "3.6.7" && "${{ matrix.python-version }}" != "3.7.13" ]]; then
if [[ "${{ matrix.python-version }}" != "3.7.13" ]]; then
pip install -U -r requirements-dev.txt
else
# Install packages from requirements-dev.txt except those with a fixed version.
Expand All @@ -47,7 +44,7 @@ jobs:
- name: Install sympy or DEVELOPMENT sympy based on Python version
run: |
if [[ "${{ matrix.python-version }}" != "3.6.7" && "${{ matrix.python-version }}" != "3.7.13" ]]; then
if [[ "${{ matrix.python-version }}" != "3.7.13" ]]; then
pip install git+https://github.com/sympy/sympy.git
else
pip install sympy
Expand All @@ -58,8 +55,8 @@ jobs:
echo "Running CI tests with SymPy version = $(isympy --version)"
echo "Running CI tests with clang-format version = $(clang-format --version)"
- name: Check mypy and black versions when Python != 3.6.7 and != 3.7.13 chosen (they are too broken in those Python versions).
if: matrix.python-version != '3.6.7' && matrix.python-version != '3.7.13'
- name: Check mypy and black versions when != 3.7.13 chosen (they are too broken in those Python versions).
if: matrix.python-version != '3.7.13'
run: |
mypy --version
black --version
Expand All @@ -76,17 +73,17 @@ jobs:
echo "-={ $python_file }=-"
echo "-={ Step 1: Doctests/run Python module }=-"
DOCTEST_MODE=1 PYTHONPATH=.:$PYTHONPATH python $python_file || { failed_tests+=("doctest in $python_file"); break; }
# Turns out that black in Python 3.6 & 3.7 has a heart attack when parsing equations/general_relativity/BSSN_quantities.py:
# Turns out that black in Python 3.7 has a heart attack when parsing equations/general_relativity/BSSN_quantities.py:
# INTERNAL ERROR: Black produced code that is not equivalent to the source. Please report a bug on ....
if [[ "${{ matrix.python-version }}" != "3.6.7" && "${{ matrix.python-version }}" != "3.7.13" && "${{ matrix.python-version }}" != "3.8.18" ]]; then
if [[ "${{ matrix.python-version }}" != "3.7.13" && "${{ matrix.python-version }}" != "3.8.18" ]]; then
echo "-={ Step 2: black $python_file }=-"
black --check $python_file || { failed_tests+=("black in $python_file"); break; }
echo "-={ Step 3: mypy }=-"
PYTHONPATH=.:$PYTHONPATH mypy --strict --pretty --allow-untyped-calls $python_file || { failed_tests+=("mypy in $python_file"); break; }
fi
echo "-={ Step 4: pylint }=-"
pylint_score="0"
if [[ "${{ matrix.python-version }}" == "3.6.7" || "${{ matrix.python-version }}" == "3.7.13" ]]; then
if [[ "${{ matrix.python-version }}" == "3.7.13" ]]; then
pylint_score=$(PYTHONPATH=.:$PYTHONPATH pylint --rcfile=.pylintrc_python36 $python_file | tail -2 | grep -Eo '[0-9\.]+' | head -1 || echo "0")
else
pylint_score=$(PYTHONPATH=.:$PYTHONPATH pylint --rcfile=.pylintrc $python_file | tail -2 | grep -Eo '[0-9\.]+' | head -1 || echo "0")
Expand Down

0 comments on commit 540d4ed

Please sign in to comment.