-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create GH action to run tests and SA inside docker container
- Loading branch information
1 parent
30a3a8f
commit 7f35dc0
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
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 |