-
-
Save leo-pfeiffer/9c0c691a98cbba517afe231f75d6fe65 to your computer and use it in GitHub Desktop.
Run Docker Compose + in Github Action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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