Skip to content

Commit 5f16d5b

Browse files
authored
Add a CI workflow
1 parent ca3233b commit 5f16d5b

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: CI PHP
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
php-tests:
19+
runs-on: ubuntu-latest
20+
steps:
21+
# To automatically get bug fixes and new Php versions for shivammathur/setup-php,
22+
# change this to (see https://github.com/shivammathur/setup-php#bookmark-versioning):
23+
# uses: shivammathur/setup-php@v2
24+
- uses: shivammathur/setup-php@2cb9b829437ee246e9b3cac53555a39208ca6d28
25+
with:
26+
php-version: '8.2'
27+
- uses: actions/checkout@v3
28+
- name: Cache Composer packages
29+
id: composer-cache
30+
uses: actions/cache@v3
31+
with:
32+
path: vendor
33+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-php-
36+
- name: Install Dependencies
37+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
38+
- name: Execute tests
39+
run: composer run test

0 commit comments

Comments
 (0)