add github actions #6
Workflow file for this run
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 Image Publish | |
on: | |
pull_request: | |
push: { branches: master } | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
test: | |
name: Run test suite | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
name: Create .env | |
run: cp .env.example .env | |
- | |
name: Build docker | |
run: docker compose -f ./docker-compose.actions.yml build | |
- | |
name: Start docker | |
run: docker compose -f ./docker-compose.actions.yml up -d | |
- | |
name: Run backend tests | |
run: docker compose exec php composer test | |
- | |
name: Run frontend tests | |
run: docker compose exec node run test |