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
| Name | Description | Default | Required |
|---|---|---|---|
| command | Command to run tests | N/A | true |
| docker-compose-version | Docker compose version | 1.29.2 | false |
| entrypoint | Entrypoint | /bin/sh | false |
| file | Docker compose file | N/A | true |
| login | Docker login | false | |
| password | Docker password | false | |
| registry | Docker registry | N/A | true |
| service | Service run tests inside | N/A | true |
| workdir | Working directory | ./ | false |
Outputs
| Name | Description |
|---|