Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
Created October 20, 2020 01:49
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save cecilemuller/437d7340b9f095cf5635dc9780a05092 to your computer and use it in GitHub Desktop.
Save cecilemuller/437d7340b9f095cf5635dc9780a05092 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