This commit is contained in:
@@ -11,13 +11,38 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ssh-key: ${{ secrets.SSH_JOHN_PRIVATE_KEY }}
|
ssh-key: ${{ secrets.SSH_JOHN_PRIVATE_KEY }}
|
||||||
|
- name: Setup Python
|
||||||
|
id: setup_python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.14.1'
|
||||||
|
- name: Restore cached virtualenv
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
|
with:
|
||||||
|
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
|
||||||
|
path: .venv
|
||||||
|
- name: Create virtual env
|
||||||
|
run: |
|
||||||
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
which python
|
||||||
|
python --version
|
||||||
|
python -m sqlite3 --version
|
||||||
- name: Install poetry
|
- name: Install poetry
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install poetry==2.3.4
|
source .venv/bin/activate
|
||||||
|
pip install poetry==2.3.4
|
||||||
- name: Install the project dependencies
|
- name: Install the project dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m poetry install
|
source .venv/bin/activate
|
||||||
python3 -m poetry env info
|
poetry install
|
||||||
|
poetry env info
|
||||||
|
- name: Cache virtual env
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
|
||||||
|
path: .venv
|
||||||
- name: Run the automated tests
|
- name: Run the automated tests
|
||||||
run: |
|
run: |
|
||||||
python3 -m poetry run python -m pytest tests
|
source .venv/bin/activate
|
||||||
|
poetry run pytest tests
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ ENV PYTHONFAULTHANDLER=1 \
|
|||||||
POETRY_CACHE_DIR='/var/cache/pypoetry' \
|
POETRY_CACHE_DIR='/var/cache/pypoetry' \
|
||||||
POETRY_HOME='/usr/local'
|
POETRY_HOME='/usr/local'
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk upgrade && \
|
||||||
|
rm -rf /var/cache/apk/*
|
||||||
RUN apk add --no-cache tini
|
RUN apk add --no-cache tini
|
||||||
RUN pip install -Iv --no-cache-dir "poetry==${POETRY_VERSION}"
|
RUN pip install -Iv --no-cache-dir "poetry==${POETRY_VERSION}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user