Skip to main content

GitHub Action: docker-compose-test-run

Up docker compose and run tests in specific container

Introduction

Run tests in enviroment defined with Docker Compose

Usage

  name: Push into Main
on:
push:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Tests
uses: cloudposse/github-action-docker-compose-test-run@main
with:
file: test/docker-compose.yml
service: app
command: test/unit-tests.sh

Inputs

NameDescriptionDefaultRequired
commandCommand to run testsN/Atrue
docker-compose-versionDocker compose version1.29.2false
entrypointEntrypoint/bin/shfalse
fileDocker compose fileN/Atrue
loginDocker loginfalse
passwordDocker passwordfalse
registryDocker registryN/Atrue
serviceService run tests insideN/Atrue
workdirWorking directory./false

Outputs

NameDescription