-
Notifications
You must be signed in to change notification settings - Fork 176
46 lines (35 loc) · 1.12 KB
/
pr-unit-testing.yml
File metadata and controls
46 lines (35 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: PR Unit Testing
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Triggers the workflow on pull request events
pull_request:
branches:
- develop
env:
ACTION_VERSION: 3
jobs:
pr_unit_testing:
runs-on: ubuntu-latest
name: 'Unit Test PR in Latest Stable Requirements'
steps:
- name: Checkout Code
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v6
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- name: Start Docker Environment
run: docker compose up -d
- name: Run PHPUnit Tests
run: docker compose exec app /bin/bash -c 'composer install && composer phpunit'
- name: Shutdown Docker Environment
if: success() || failure()
run: docker compose down
- name: Generate Coverage Report
if: success() && ${{ github.event_name == 'pull_request' }}
# https://github.com/marketplace/actions/coverage-report-as-comment-clover
uses: lucassabreu/comment-coverage-clover@main
with:
file: clover.xml