Last active
October 12, 2022 13:56
-
-
Save Yengas/19be5708607cf4955fef1e323083d251 to your computer and use it in GitHub Desktop.
Gitlab CI YML for running Testcontainers tests in Gitlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- test | |
integration-test: | |
extends: .node-cache | |
stage: test | |
image: node:14-alpine | |
services: | |
- name: docker:20.10.1-dind | |
command: ['--tls=false', '--host=tcp://0.0.0.0:2376'] | |
variables: | |
DOCKER_HOST: "tcp://docker:2375" | |
DOCKER_TLS_CERTDIR: "" | |
DOCKER_DRIVER: "overlay2" | |
script: | |
- export CI=true | |
- npm ci | |
- npm test | |
- npm run test:integration | |
.node-cache: | |
cache: | |
key: | |
files: | |
- package.json | |
- package-lock.json | |
paths: | |
- node_modules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment