Skip to content

Instantly share code, notes, and snippets.

@Yengas
Last active October 12, 2022 13:56
Show Gist options
  • Save Yengas/19be5708607cf4955fef1e323083d251 to your computer and use it in GitHub Desktop.
Save Yengas/19be5708607cf4955fef1e323083d251 to your computer and use it in GitHub Desktop.
Gitlab CI YML for running Testcontainers tests in Gitlab
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