Skip to content

Commit

Permalink
Support for python 3.10 (#112)
Browse files Browse the repository at this point in the history
* refactor ci and include build for py310

* mention support for py3.10
  • Loading branch information
almarklein committed Jan 10, 2022
1 parent 07d8a95 commit 86bd268
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 33 deletions.
60 changes: 28 additions & 32 deletions .github/workflows/ci.yml
Expand Up @@ -8,76 +8,72 @@ on:


jobs:
build:

lint:
name: linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install black flake8 invoke
- name: Lint
shell: bash
run: |
invoke checkformat
invoke lint
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Lint
os: ubuntu-latest
pyversion: '3.7'
dolint: 1
- name: Linux py36
os: ubuntu-latest
pyversion: '3.6'
tests: 1
- name: Linux py37
os: ubuntu-latest
pyversion: '3.7'
tests: 1
- name: Linux py38
os: ubuntu-latest
pyversion: '3.8'
tests: 1
- name: Linux py39
os: ubuntu-latest
pyversion: '3.9'
tests: 1
- name: Linux py310
os: ubuntu-latest
pyversion: '3.10'
- name: Linux pypy3
os: ubuntu-latest
pyversion: 'pypy3'
tests: 1
- name: Windows py38
- name: Windows py39
os: windows-latest
pyversion: '3.8'
tests: 1
- name: MacOS py38
- name: MacOS py39
os: macos-latest
pyversion: '3.8'
tests: 1

steps:

- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.pyversion }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyversion }}

- name: Install dependencies (lint and docs)
if: matrix.dolint == 1
shell: bash
run: |
python -m pip install --upgrade pip
pip install black flake8 invoke
- name: Install dependencies (unit tests)
if: matrix.tests == 1
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -U -r requirements.txt
pip install pytest requests
python setup.py install
rm -rf ./timetagger ./build ./egg-info
- name: Lint
if: matrix.dolint == 1
shell: bash
run: |
invoke checkformat
invoke lint
- name: Test with pytest
if: matrix.tests == 1
shell: bash
run: |
python -c "import sys; print(sys.version, '\n', sys.prefix)";
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -15,7 +15,7 @@
# mypaas.maxmem = 256m


FROM python:3.8-slim-buster
FROM python:3.10-slim-buster

# Install dependencies (including optional ones that make uvicorn faster)
RUN pip --no-cache-dir install pip --upgrade && pip --no-cache-dir install \
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -55,5 +55,6 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
)

0 comments on commit 86bd268

Please sign in to comment.