-
-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (54 loc) · 1.95 KB
/
tests.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: tests
on:
push:
branches: [development, main]
pull_request:
branches: [development, main]
jobs:
skip-duplicates:
continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
cancel_others: "true"
concurrent_skipping: "same_content"
skip_after_successful_duplicate: "true"
paths_ignore: '["**/README.md", "**/docs/**"]'
workbench-tests:
needs: skip-duplicates
if: needs.skip-duplicates.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
extensions: zip
coverage: xdebug
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install Composer dependecies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Directory Permissions
run: sudo chown -R $(whoami) workbench vendor/pestphp/pest/.temp
- name: Run Unit & Feature tests
run: composer test
# - name: Run Browser tests
# run: composer test-browser
# - name: Generate coverage report (threshold 90%)
# run: ./vendor/bin/pest --bail --retry --coverage --min=90 --coverage-clover clover.xml
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}