2021-05-11 17:43:35 +02:00
|
|
|
language: node_js
|
|
|
|
git:
|
|
|
|
depth: false
|
|
|
|
node_js:
|
2022-07-31 08:14:52 +02:00
|
|
|
- 16
|
2021-12-14 19:45:55 +01:00
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
cache: yarn
|
|
|
|
|
|
|
|
if: (type = pull_request) OR (tag IS present)
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
2021-12-14 20:04:17 +01:00
|
|
|
- stage: Install dependencies
|
2021-12-14 19:45:55 +01:00
|
|
|
if: type = pull_request
|
|
|
|
script: yarn --frozen-lockfile
|
2021-12-14 20:04:17 +01:00
|
|
|
- stage: Check formatting
|
2021-12-14 19:45:55 +01:00
|
|
|
if: type = pull_request
|
|
|
|
script: yarn format:check
|
2021-12-14 20:04:17 +01:00
|
|
|
- stage: Execute tests
|
2021-12-14 19:45:55 +01:00
|
|
|
if: type = pull_request
|
|
|
|
script: yarn test
|
2021-12-14 20:04:17 +01:00
|
|
|
- stage: Build application
|
2021-12-14 19:45:55 +01:00
|
|
|
if: type = pull_request
|
|
|
|
script: yarn build:all
|
2021-12-14 20:04:17 +01:00
|
|
|
- stage: Build and publish docker image
|
2021-12-14 19:45:55 +01:00
|
|
|
if: tag IS present
|
|
|
|
script: ./publish-docker-image.sh
|