Add Python 3.9, 3.10, 3.11 support #139
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
name: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
# As long as we want to test old versions of Python here in the test, we can only use up to Ubuntu 20. | |
# https://github.com/rwth-i6/returnn/issues/1226 | |
runs-on: ubuntu-20.04 | |
# continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
emacs_version: | |
# - 24.1 | |
# - 24.2 | |
# - 24.3 | |
# - 24.4 | |
# - 24.5 | |
# - 25.1 | |
# - 25.2 | |
# - 25.3 | |
- 26.1 | |
- 26.2 | |
- 26.3 | |
- 27.1 | |
# - snapshot | |
python_version: | |
- 3.6 | |
- 3.7 | |
- 3.8 | |
- 3.9 | |
- "3.10" | |
- 3.11 | |
steps: | |
# Checkout | |
- uses: actions/checkout@v3 | |
# Emacs | |
- name: Set up Emacs ${{ matrix.emacs_version }} | |
uses: purcell/setup-emacs@master | |
with: | |
version: ${{ matrix.emacs_version }} | |
# Cask | |
- name: Set up Cask | |
uses: conao3/setup-cask@master | |
with: | |
version: 'snapshot' | |
# Python | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version : ${{ matrix.python_version }} | |
check-latest: true | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt --upgrade | |
pip install -r requirements-rpc.txt --upgrade | |
pip install -r requirements-dev.txt --upgrade | |
if [[ ${{ matrix.python_version }} > 3.5 ]] ; then | |
pip install -r requirements-rpc3.6.txt --upgrade ; | |
fi | |
if [[ ${{ matrix.python_version }} < 3 ]] ; then | |
pip install -r requirements-dev2.txt --upgrade ; | |
fi | |
pip install coveralls | |
python -m virtualenv $HOME/.virtualenvs/elpy-test-venv | |
# Run tests | |
- name: Run Emacs tests | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 5 | |
command: cask install ; PYTHONPATH="`pwd`" cask exec ert-runner --reporter ert+duration | |
- name: Run Python tests | |
run: nosetests | |
# Coveralls | |
- name: Coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
if [[ ${{ matrix.python_version }} > 3 ]] ; then | |
coverage run -m nose.__main__ | |
coveralls --service=github ; | |
fi |