Skip to content

Commit

Permalink
ci/cirrus: experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
neersighted committed Mar 25, 2024
1 parent 59c8d29 commit 775873a
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,32 @@ freebsd_instance:
cpu: 2
memory: 4G

env:
# `SHELL` environment variable is not set by default, so we explicitly set it to
# avoid failures on tests that depend on it.
SHELL: sh

test_task:
name: "Tests / FreeBSD / "
only_if: $CIRRUS_TAG == ''
skip: "!changesInclude('.cirrus.yml', 'poetry.lock', 'pyproject.toml', 'src/**.py', 'tests/**')"
env:
# `SHELL` environment variable is not set by default, so we explicitly set it to
# avoid failures on tests that depend on it.
SHELL: sh
matrix:
- PYTHON: python3.8
- PYTHON: python3.9
- PYTHON: python3.10
- PYTHON: python3.11
install_prereqs_script:
- V=$(printf '%s' $PYTHON | tr -d '.[:alpha:]')
- pkg install -y python${V} py${V}-sqlite3
install_poetry_script:
- POETRY_HOME=/opt/poetry
- $PYTHON -m venv $POETRY_HOME
- $POETRY_HOME/bin/pip install --upgrade pip setuptools wheel
- $POETRY_HOME/bin/pip install poetry
- echo "PATH=$POETRY_HOME/bin:$PATH" >> $CIRRUS_ENV
install_and_test_script:
- poetry install
matrix:
- name: "Tests / pytest [FreeBSD, 3.8]"
env: {PY: 38}
- name: "Tests / pytest [FreeBSD, 3.9]"
env: {PY: 39}
- name: "Tests / pytest [FreeBSD, 3.10]"
env: {PY: 310}
- name: "Tests / pytest [FreeBSD, 3.11]"
env: {PY: 311}
bootstrap_poetry_script:
- pkg install -y python${PY} py${PY}-sqlite3 devel/py-pipx
- pipx ensurepath
- pipx install poetry
setup_script:
- poetry install --sync
- poetry env info
- poetry show
test_script:
- poetry run pytest --junitxml=junit.xml -v
on_failure:
annotate_failure_artifacts:
Expand Down

0 comments on commit 775873a

Please sign in to comment.