Skip to content

Commit a72244b

Browse files
committed
ci: update tests.yaml file
1 parent facb51d commit a72244b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/tests.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,23 @@ jobs:
1212
- name: Set up PHP
1313
uses: shivammathur/setup-php@v2
1414
with:
15-
php-version: '8.2' # Ganti dengan versi PHP yang Anda gunakan
15+
php-version: '8.2'
1616
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
1717

18+
- name: Get Composer Cache Directory
19+
id: composer-cache
20+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
21+
22+
- name: Cache Composer dependencies
23+
uses: actions/cache@v3
24+
with:
25+
path: ${{ steps.composer-cache.outputs.dir }}
26+
key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}
27+
restore-keys: |
28+
${{ runner.os }}-composer-
29+
1830
- name: Install Composer dependencies
1931
run: composer install --prefer-dist --no-dev --optimize-autoloader
2032

2133
- name: Run PHPUnit tests
22-
run: ./vendor/bin/phpunit
34+
run: php vendor/bin/phpunit

0 commit comments

Comments
 (0)