Skip to content

Instantly share code, notes, and snippets.

@tlatsas
Forked from cecilemuller/example.yml
Created July 13, 2021 11:20
Show Gist options
  • Save tlatsas/d418fec77df874494e93d58972f85269 to your computer and use it in GitHub Desktop.
Save tlatsas/d418fec77df874494e93d58972f85269 to your computer and use it in GitHub Desktop.
Run Docker Compose + in Github Action
name: Test
on:
push:
branches:
- main
- features/**
- dependabot/**
pull_request:
branches:
- main
jobs:
docker:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Start containers
run: docker-compose -f "docker-compose.yml" up -d --build
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
- name: Stop containers
if: always()
run: docker-compose -f "docker-compose.yml" down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment