Skip to content

Instantly share code, notes, and snippets.

@leo-pfeiffer
Forked from cecilemuller/example.yml
Created August 1, 2021 14:25
Show Gist options
  • Save leo-pfeiffer/9c0c691a98cbba517afe231f75d6fe65 to your computer and use it in GitHub Desktop.
Save leo-pfeiffer/9c0c691a98cbba517afe231f75d6fe65 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