Skip to content

Instantly share code, notes, and snippets.

@dasmido
Forked from cecilemuller/example.yml
Created July 10, 2021 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasmido/986ab70aa281ff575c232155b8cc4154 to your computer and use it in GitHub Desktop.
Save dasmido/986ab70aa281ff575c232155b8cc4154 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