summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2023-10-21 12:02:41 -0300
committerRoger Gonzalez <roger@rogs.me>2023-10-21 12:02:41 -0300
commite92e6bd1c4974f2a77d8ca690667519376e913d8 (patch)
tree40e826a08d50567c2527ca1db7b7463e4425ec42
parentf109f5f9c5ccc73750522a9af21e6794fc0009e7 (diff)
Trying the python image directly
-rw-r--r--.gitlab-ci.yml39
1 files changed, 21 insertions, 18 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 26a09d3..32b3a3b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,24 +1,27 @@
-stages:
- - lint
- - test
+image: python:3.11.5
+
+variables:
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
+
+cache:
+ paths:
+ - .cache/pip
+
+before_script:
+ - python --version ; pip --version # For debugging
+ - pip install virtualenv
+ - virtualenv venv
+ - source venv/bin/activate
+ - pip install -r requirements.txt
lint:
- stage: lint
script:
- - apt-get update -qy
- - apt-get install -y python3 python3-pip
- - python3 -m pip install -r requirements.txt
- - python3 -m black --check .
- - python3 -m isort --check .
- - python3 -m flake8
- - python3 -m pylint app
- - python3 -m mypy .
+ - python -m black --check .
+ - python -m isort --check .
+ - python -m flake8
+ - python -m pylint app
+ - python -m mypy .
test:
- stage: test
script:
- - apt-get update -qy
- - apt-get install -y python3 python3-pip
- - python3 -m pip install --upgrade pip
- - python3 -m pip install -r requirements.txt
- - python3 -m pytest
+ - python -m pytest