Skip to content
Snippets Groups Projects
Commit f8a360f0 authored by Teklia Bot's avatar Teklia Bot Committed by Manon Blanco
Browse files

Bump Python requirement arkindex-base-worker to 0.3.5

parent 0e7f0f3e
No related branches found
No related tags found
1 merge request!434Bump Python requirement arkindex-base-worker to 0.3.5
Pipeline #143042 canceled
......@@ -55,8 +55,7 @@ test:
- tox -- --junitxml=test-report.xml --durations=50
test-cookiecutter:
# Needed till next release
image: python:3.11
image: python:slim
stage: test
cache:
......@@ -68,6 +67,7 @@ test-cookiecutter:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.cache/pre-commit"
ARKINDEX_API_SCHEMA_URL: schema.yml
DEBIAN_FRONTEND: non-interactive
except:
- schedules
......@@ -75,6 +75,9 @@ test-cookiecutter:
before_script:
- pip install cookiecutter tox pre-commit
# Install curl and git
- apt-get update -q -y && apt-get install -q -y --no-install-recommends curl git
# Configure git to be able to commit in the hook
- git config --global user.email "crasher@teklia.com"
- git config --global user.name "Crash Test"
......
......@@ -3,9 +3,18 @@ stages:
- build
- release
# GitLab provides a template to ensure pipelines run only for branches and tags, not for merge requests
# This prevents duplicate pipelines in merge requests.
# See https://docs.gitlab.com/ee/ci/troubleshooting.html#job-may-allow-multiple-pipelines-to-run-for-a-single-action
include:
- template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
variables:
VERSION: $CI_COMMIT_SHA
DEBIAN_FRONTEND: non-interactive
test:
# Pinned to <3.12 till next arkindex-base-worker release
image: python:3.11
image: python:slim
stage: test
cache:
......@@ -19,6 +28,9 @@ test:
before_script:
- pip install tox
# Install curl
- apt-get update -q -y && apt-get install -q -y --no-install-recommends curl
# Download OpenAPI schema from last backend build
- curl https://assets.teklia.com/arkindex/openapi.yml > schema.yml
......@@ -29,7 +41,7 @@ test:
- tox -- --junitxml=test-report.xml --durations=50
lint:
image: python:3
image: python:slim
cache:
paths:
......@@ -43,6 +55,9 @@ lint:
before_script:
- pip install pre-commit
# Install git
- apt-get update -q -y && apt-get install -q -y --no-install-recommends git
except:
- schedules
......@@ -75,6 +90,7 @@ release-notes:
stage: release
image: registry.gitlab.teklia.com/infra/devops:latest
# Only run on tags
only:
- tags
......
......@@ -5,8 +5,8 @@ repos:
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/ambv/black
rev: 23.1.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
......
arkindex-base-worker==0.3.4
arkindex-base-worker==0.3.5
......@@ -49,4 +49,5 @@ setup(
install_requires=parse_requirements(),
entry_points={"console_scripts": [f"{COMMAND}={MODULE}.worker:main"]},
packages=find_packages(),
python_requires=">=3.10",
)
......@@ -15,7 +15,7 @@ def setup_environment(responses, monkeypatch) -> None:
# defaulting to the prod environment
schema_url = os.environ.get(
"ARKINDEX_API_SCHEMA_URL",
"https://arkindex.teklia.com/api/v1/openapi/?format=openapi-json",
"https://demo.arkindex.org/api/v1/openapi/?format=openapi-json",
)
responses.add_passthru(schema_url)
......@@ -23,6 +23,8 @@ def setup_environment(responses, monkeypatch) -> None:
os.environ["ARKINDEX_API_SCHEMA_URL"] = schema_url
# Setup a fake worker run ID
os.environ["ARKINDEX_WORKER_RUN_ID"] = "1234-{{ cookiecutter.slug }}"
# Setup a fake corpus ID
os.environ["ARKINDEX_CORPUS_ID"] = "1234-corpus-id"
# Setup a mock api client instead of using a real one
def mock_setup_api_client(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment