Files
grecia/.gitlab-ci.yml
Javi Martín 210a91bd8f Use postgreSQL 14 as postgres Docker image
PostgreSQL 13 will reach its end-of-life on November 13, 2025. So we're
upgrading before that happens.

We're also upgrading to PostgreSQL 14 in our CI. In this case, we're
using the default distribution (Trixie, as of October 2025); it doesn't
affect the development or production environments, so it's OK if use the
default one.
2025-10-17 14:00:52 +02:00

54 lines
1.3 KiB
YAML

stages:
- test
- lint
tests:
image: "ruby:3.3.8"
stage: test
services:
- postgres:14.19
cache:
key: consul
paths:
- vendor/
variables:
DB_HOST: postgres
PGUSER: consul
PGPASSWORD: password
POSTGRES_USER: consul
POSTGRES_PASSWORD: password
RAILS_ENV: test
TEST_COVERAGE: 1
parallel: 5
script:
- apt-get update && apt-get install -y nodejs npm chromium
- for i in config/*.example; do cp "$i" "${i/.example}"; done
- bundle --without development
- npm clean-install
- bundle exec rake db:setup
- bundle exec rake assets:precompile > /dev/null 2>&1
- bin/knapsack_pro_rspec
artifacts:
when: on_failure
paths:
- tmp/screenshots/
# To make this job work, create a Personal Access Token with permissions
# to comment on your repository and add a variable named
# PRONTO_GITLAB_API_PRIVATE_TOKEN to your repository CI/CD settings
# giving it the value of the Personal Access Token
linters:
image: "ruby:3.3.8"
stage: lint
cache:
key: consul
paths:
- vendor/
only:
- merge_requests
script:
- apt-get update && apt-get install -y nodejs cmake pkg-config
- bundle --without test
- git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
- bundle exec pronto run -f gitlab_mr -c origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME