Skip to content

Commit

Permalink
Create GH action to run tests and SA inside docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
maks-rafalko committed Jun 2, 2024
1 parent 30a3a8f commit 7f35dc0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'CI: tests, static analysis'
on:
pull_request:
push:
branches: ['master']

env:
APP_ENV: dev
APP_SECRET: infection_ci_secret
DATABASE_ROOT_PASSWORD: root
DATABASE_PASSWORD: infection_ci_pass
DATABASE_NAME: infection_ci_playground
DATABASE_USER: infection_ci

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: pcov
ini-values: xdebug.mode=off
tools: composer

- name: Build docker image
run: docker compose up -d --build php

- name: Run tests
run: docker-compose exec -T php vendor/bin/phpunit

0 comments on commit 7f35dc0

Please sign in to comment.