Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
anthologia-site
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ecrinum
anthologia
anthologia-site
Commits
22c5cd6e
Commit
22c5cd6e
authored
1 month ago
by
Sarah Rubio
Browse files
Options
Downloads
Plain Diff
Merge branch 'bugfix/CI-ubuntu-image' into 'bugfix/CI'
parents
bd04d1de
ee80a9e6
No related branches found
Branches containing commit
No related tags found
3 merge requests
!166
From preprod to prod
,
!158
Bugfix : Utilisation d'une image ubuntu pour la CI
,
!156
Fix : CI avec lancement des tests unitaires
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+28
-20
28 additions, 20 deletions
.gitlab-ci.yml
Makefile
+3
-0
3 additions, 0 deletions
Makefile
with
31 additions
and
20 deletions
.gitlab-ci.yml
+
28
−
20
View file @
22c5cd6e
stages
:
-
test
# Define the variables globally
variables
:
POSTGRES_DB
:
anthology
POSTGRES_USER
:
anthology_django
...
...
@@ -11,30 +9,40 @@ variables:
APT_STATE_LISTS
:
"
$CI_PROJECT_DIR/.apt/lists"
APT_CACHE_ARCHIVES
:
"
$CI_PROJECT_DIR/.apt/archives"
cache
:
-
key
:
files
:
-
uv.lock
paths
:
-
$UV_CACHE_DIR
-
paths
:
-
.apt/
test
:
stage
:
test
image
:
postgis/postgis:17-3.5
# Defining image, services and cache by default (defining globally is deprecated)
default
:
image
:
ubuntu:latest
services
:
-
name
:
postgis/postgis:17-3.5
alias
:
postgres
before_script
:
cache
:
-
key
:
files
:
-
uv.lock
paths
:
-
$UV_CACHE_DIR
-
paths
:
-
.apt/
# Defining the stages present in this pipeline
stages
:
-
build
# Running build stage
install_environment
:
stage
:
build
script
:
# Install dependencies and create associated cache dirs
-
mkdir -p "${APT_STATE_LISTS}/partial"
-
mkdir -p "${APT_CACHE_ARCHIVES}/partial"
-
apt update -qy
-
apt install -y apt-utils curl libgdal-dev make locales locales-all gettext sudo
-
apt install -y apt-utils curl
postgresql postgresql-contrib
libgdal-dev make locales locales-all gettext sudo
-
locale
-
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
-
sudo locale-gen "en_US.UTF-8"
-
sudo update-locale LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8"
-
sudo dpkg-reconfigure --frontend=noninteractive locales
-
export LC_ALL=en_US.UTF-8
-
export LANG=en_US.UTF-8
-
locale
-
export PGPASSWORD=$POSTGRES_PASSWORD
-
psql --username $POSTGRES_USER --host postgres -d $POSTGRES_DB -c "ALTER ROLE anthology_django SET client_encoding TO 'utf8';"
...
...
@@ -49,5 +57,5 @@ test:
-
source $HOME/.local/bin/env
# Check the available version of Python
-
uv python list
script
:
-
make compilemessages_ci
-
make tests_ci
This diff is collapsed.
Click to expand it.
Makefile
+
3
−
0
View file @
22c5cd6e
...
...
@@ -3,6 +3,9 @@ integration_tests:
uv run python
-m
playwright
install
cd
django/
&&
DJANGO_SETTINGS_MODULE
=
anthology.settings.local uv run pytest ../integration
--browser
firefox
--browser
chromium
--browser
webkit
--base-url
http://127.0.0.1:8000
compilemessages_ci
:
cd
django/
&&
DJANGO_SETTINGS_MODULE
=
anthology.settings.gitlab_test uv run manage.py compilemessages
tests_ci
:
cd
django/
&&
DJANGO_SETTINGS_MODULE
=
anthology.settings.gitlab_test uv run pytest
-x
-vv
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment