Skip to content

Commit e0284ca

Browse files
committed
Merge branch 'feature/test-new-features-for-pipeline' into 'main'
Extend test coverage by using also other node images See merge request belle2/software/display!13
2 parents 365e801 + 1cd62c5 commit e0284ca

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

.gitlab-ci.yml

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,31 @@ stages:
33
- build
44
- documentation
55

6-
image:
7-
node:20
8-
96
workflow:
107
rules:
118
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
129
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == 'main'
1310

14-
before_script:
15-
# Check for updates and install build-essential
16-
- apt-get update -y
17-
- apt-get upgrade -y
18-
- apt-get install -y build-essential
19-
# Print the exact versions of node and npm
20-
- node --version
21-
- npm --version
11+
default:
12+
image: node:20
13+
interruptible: true # All the jobs can be interrupted by newer pipelines
14+
before_script:
15+
# Check for updates and install build-essential
16+
- apt-get update -y
17+
- apt-get upgrade -y
18+
- apt-get install -y build-essential
19+
# Print the exact versions of node and npm
20+
- node --version
21+
- npm --version
2222

2323
formatting:
2424
stage: formatting
2525
rules:
2626
# Run this stage only during pipelines associated to merge requests
2727
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
2828
script:
29+
# Start the job
30+
- echo "Running job \"${CI_JOB_NAME}\" with the image \"${CI_JOB_IMAGE}\"..."
2931
# Install angular
3032
- npm install -g @angular/[email protected]
3133
# Install the dependencies
@@ -42,20 +44,27 @@ formatting:
4244
echo "Run locally \`npm run prettier\` and commit the formatted files."
4345
exit 1
4446
fi
45-
# Stage successfully completed
46-
- echo "${CI_JOB_STAGE} stage successfully completed"
47+
# Job successfully completed
48+
- echo "Successfully completed job \"${CI_JOB_NAME}\" with the image \"${CI_JOB_IMAGE}\""
4749

4850
build:
4951
stage: build
52+
# Run this job using multiple node images
53+
image: $IMAGE
54+
parallel:
55+
matrix:
56+
- IMAGE: ['node:16', 'node:18', 'node:20'] # All the images we want to use
5057
script:
58+
# Start the job
59+
- echo "Running job \"${CI_JOB_NAME}\" with the image \"${CI_JOB_IMAGE}\"..."
5160
# Install angular
5261
- npm install -g @angular/[email protected]
5362
# Install the dependencies
5463
- npm ci
5564
# Build the application
5665
- npm run build
57-
# Stage successfully completed
58-
- echo "${CI_JOB_STAGE} stage successfully completed"
66+
# Job successfully completed
67+
- echo "Successfully completed job \"${CI_JOB_NAME}\" with the image \"${CI_JOB_IMAGE}\""
5968

6069
documentation:
6170
stage: documentation
@@ -66,6 +75,8 @@ documentation:
6675
expose_as: 'sphinx documentation'
6776
when: on_success
6877
script:
78+
# Start the job
79+
- echo "Running job \"${CI_JOB_NAME}\" with the image \"${CI_JOB_IMAGE}\"..."
6980
# Install python3-venv and create a virtual environment
7081
- apt-get install -y python3-venv
7182
- python3 -m venv display-env
@@ -74,5 +85,5 @@ documentation:
7485
- pip3 install -r requirements-docs.txt
7586
# Build the documentation
7687
- sphinx-build docs/source/ docs/build
77-
# Stage successfully completed
78-
- echo "${CI_JOB_STAGE} stage successfully completed"
88+
# Job successfully completed
89+
- echo "Successfully completed job \"${CI_JOB_NAME}\" with the image \"${CI_JOB_IMAGE}\""

docs/source/developer/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For developers, to set up the local environment, please follow the steps below.
99
`official website`_.
1010

1111
Note that the recommended version of Angular CLI (see below) requires a minimum Node.js version
12-
of v14.20, v16.30, v18.10 or v20.0.
12+
of v16.30, v18.10 or v20.0.
1313

1414
.. _official website: https://nodejs.org/en/download
1515

0 commit comments

Comments
 (0)