Skip to content

Commit

Permalink
Use Python 3.10 stable in CI (#1362)
Browse files Browse the repository at this point in the history
* Remove special case code needed for Python 3.10 pre-release and try to get Python 3.11 pre-release running on CI
* Wrap 3.10 in quotes so it doesn't resolve to 3.1
* Remove pflake --version call that is crashing in Python 3.11-dev
* Run poetry update and restore removed flake8 line
  • Loading branch information
micahellison authored Nov 6, 2021
1 parent a354b13 commit 06ee6db
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 78 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
if: >
! contains(github.event.head_commit.message, '[ci skip]')
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.python-version == '3.10-dev' }}
continue-on-error: ${{ matrix.python-version == '3.11-dev' }}
strategy:
fail-fast: false
matrix:
python-version: [ 3.7, 3.8, 3.9, 3.10-dev ]
python-version: [ 3.7, 3.8, 3.9, '3.10', 3.11-dev ]
os: [ ubuntu-latest, macos-latest, windows-latest ]

steps:
Expand All @@ -52,7 +52,6 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-${{ secrets.CACHE_STRING }}

- name: Install dependencies
if: ${{ matrix.python-version != '3.10-dev' }}
run: |
echo '::group::poetry'
pip --disable-pip-version-check install poetry
Expand All @@ -65,29 +64,14 @@ jobs:
echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV
- name: Install dependencies (Prerelease)
if: ${{ matrix.python-version == '3.10-dev' }}
run: |
echo '::group::poetry'
pip --disable-pip-version-check install poetry==1.2.0a2
poetry config --local virtualenvs.in-project true
echo '::endgroup::'
echo '::group::Other dependencies'
poetry install --remove-untracked --no-dev --extras testing
echo '::endgroup::'
echo 'DEPS_INSTALLED=true' >> $GITHUB_ENV
- name: Code formatting (Black)
if: ${{ matrix.python-version != '3.10-dev' && env.DEPS_INSTALLED == 'true' }}
if: ${{ env.DEPS_INSTALLED == 'true' }}
run: |
poetry run black --version
poetry run black --check --diff .
- name: Code Style (flake8)
if: ${{ matrix.python-version != '3.10-dev' && env.DEPS_INSTALLED == 'true' }}
if: ${{ env.DEPS_INSTALLED == 'true' }}
run: |
poetry run pflake8 --version
poetry run pflake8 jrnl tests
Expand Down
106 changes: 49 additions & 57 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
"Funding" = "https://opencollective.com/jrnl"

[tool.poetry.dependencies]
python = ">=3.7.0, <3.11"
python = ">=3.7.0, <3.12"

ansiwrap = "^0.8.4"
asteval = "^0.9"
Expand Down

0 comments on commit 06ee6db

Please sign in to comment.