Skip to content

Commit 019f45d

Browse files
Michael Decklikeadeckofcards
authored andcommitted
Add Github Actions to repo
1 parent 595a123 commit 019f45d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/php.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: PHP Composer
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
- dev
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Validate composer.json and composer.lock
24+
run: composer validate --strict
25+
26+
- name: Cache Composer packages
27+
id: composer-cache
28+
uses: actions/cache@v3
29+
with:
30+
path: vendor
31+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-php-
34+
35+
- name: Install dependencies
36+
run: composer install --prefer-dist --no-progress
37+
38+
- name: Check Code Style
39+
run: ./vendor/bin/pint --test
40+
41+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
42+
# Docs: https://getcomposer.org/doc/articles/scripts.md
43+
44+
# - name: Run test suite
45+
# run: composer run-script test

0 commit comments

Comments
 (0)