Skip to content

Commit

Permalink
[ci] Launch CI on 4 latest python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nrybowski committed Dec 21, 2024
1 parent 9be73d9 commit e53b0e2
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,42 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

tests:

strategy:
# Ensure that each python version will be tested even if one of them fails.
fail-fast: false
matrix:
python_version: ["3.10", "3.11", "3.12", "3.13"]

# The type of runner that the job will run on
runs-on: ubuntu-20.04
env:
PYENV_ROOT: "$HOME/.pyenv"
# PATH: "$PYENV_ROOT/bin:$PATH"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it

- uses: actions/checkout@v2

- name: Add pyenv to PATH
run: echo "$PYENV_ROOT/bin" >> "$GITHUB_PATH"
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python_version }}

- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y libtidy5deb1 libzmq3-dev \
build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl git \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
curl https://pyenv.run | bash
# echo "export PYENV_ROOT=\"$HOME/.pyenv\"" >> ~/.bashrc
# echo "[[ -d $PYENV_ROOT/bin ]] && export PATH=\"$PYENV_ROOT/bin:$PATH\"" >> ~/.bashrc
# echo "eval \"$(pyenv init -)\"" >> ~/.bashrc
# source ~/.bashrc
# echo "PYENV_ROOT=\"$HOME/.pyenv\"" >> $env:GITHUB_ENV
eval "$(pyenv init -)"
pyenv install ${{ matrix.python_version }}
pyenv global ${{ matrix.python_version }}
pip3 install coverage==7.6.9 pytest==8.0.0 virtualenv==20.25.0 setuptools==69.1.0\
setuptools-scm==8.0.4
coverage --version
- name: Start services
run: |
# export PYENV_ROOT="$HOME/.pyenv"
# [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
# eval "$(pyenv init -)"
sudo systemctl start mongod
sudo systemctl start docker
coverage --version
- name: Install INGInious
run: |
pip3 install .
coverage --version
- name: Launch pytest tests
run: coverage run --branch -m pytest -v
Expand Down

0 comments on commit e53b0e2

Please sign in to comment.