forked from codeigniter4/CodeIgniter4
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.3 KB
/
test-autoreview.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
name: Automatic Code Review
on:
pull_request:
paths:
- composer.json
- spark
- '**.php'
- .github/workflows/test-autoreview.yml
push:
paths:
- composer.json
- spark
- '**.php'
- .github/workflows/test-autoreview.yml
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
auto-review-tests:
name: Automatic Code Review
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
coverage: none
- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer update --ansi
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
- name: Run AutoReview Tests
run: vendor/bin/phpunit --color=always --group=auto-review --no-coverage