Refactor github action #1
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: testing | |
on: [push, pull_request] | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.10, 3.11, 3.12] | |
include: | |
- python-version: 3.12 | |
allow-failure: true | |
poetry-version: ["1.2.2", "1.7.1"] | |
os: [ubuntu-22.04, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
pip install numpy scipy cython | |
sudo apt install bowtie2 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
# see details (matrix, python-version, python-version-file, etc.) | |
# https://github.com/actions/setup-python | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- uses: actions/cache@v3 | |
name: Define a cache for the virtual environment based on the dependencies lock file | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- name: Install the project dependencies | |
run: poetry install --only test -C meteor | |
- name: Run the automated tests (for example) | |
run: poetry run -C meteor pytest --cov=meteor --cov-report xml |