Skip to content

Commit 6fe5d78

Browse files
Add basic GitHub workflow to run CI (#11)
* Add basic GitHub workflow to run CI * Remove Mini CI --------- Co-authored-by: Viktor Szépe <[email protected]>
1 parent eabedbf commit 6fe5d78

File tree

3 files changed

+41
-4
lines changed

3 files changed

+41
-4
lines changed

.github/workflows/integrate.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Integrate"
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
pull_request: null
8+
9+
permissions:
10+
contents: "read"
11+
12+
jobs:
13+
test:
14+
runs-on: "ubuntu-latest"
15+
16+
strategy:
17+
matrix:
18+
php-version:
19+
- "7.4"
20+
- "8.0"
21+
- "8.1"
22+
- "8.2"
23+
- "8.3"
24+
- "8.4"
25+
26+
steps:
27+
- name: "Checkout repository"
28+
uses: "actions/checkout@v4"
29+
30+
- name: "Set up PHP"
31+
uses: "shivammathur/setup-php@v2"
32+
with:
33+
coverage: "none"
34+
php-version: "${{ matrix.php-version }}"
35+
36+
- name: "Install dependencies"
37+
run: "composer install --no-interaction --no-progress --prefer-dist"
38+
39+
- run: "composer run test"

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
}
2727
},
2828
"scripts": {
29-
"cleanup": "git status --short --ignored | sed -n -e 's#^!! ##p' | xargs -r rm -vrf"
29+
"cleanup": "git status --short --ignored | sed -n -e 's#^!! ##p' | xargs -r rm -vrf",
30+
"test": "php -r \"require './vendor/php-stubs/wordpress-stubs/wordpress-stubs.php'; require 'gravity-forms-stubs.php';\""
3031
},
3132
"scripts-descriptions": {
3233
"cleanup": "Remove all ignored files."

generate.sh

-3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,3 @@ sed -i -e 's#^\(\s*function \)\(rgar(.*\)$#\1__\2#' source/gravityforms/xml.php
2929

3030
# Remove CR characters
3131
dos2unix -k "$FILE"
32-
33-
# Mini CI
34-
php -r 'require "../wordpress-stubs/wordpress-stubs.php"; require "gravity-forms-stubs.php";'

0 commit comments

Comments
 (0)