Update README.md #28
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: Docker Compose CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create .env | |
run: cp .env.example .env | |
- name: Create public.pem | |
run: cp keys/public.pem.example keys/public.pem | |
- name: Create private.pem | |
run: cp keys/private.pem.example keys/private.pem | |
- name: Create tests .env | |
run: cp tests/.env.test.example tests/.env.test | |
- name: Build docker images | |
run: docker-compose build | |
- name: Run docker images | |
run: docker-compose up -d | |
- name: Run tests | |
run: docker exec -t app npm test | |
- name: Clean up | |
if: success() || failure() | |
run: docker-compose down --rmi all -v --remove-orphans |