Skip to content

Commit 56b1aee

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 8c972d5 + 45e4040 commit 56b1aee

33 files changed

+3184
-202
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Continuous Integration"
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
8+
tests:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- operating-system: 'ubuntu-latest'
14+
silverstripe-version: '5.0'
15+
php-version: '8.1'
16+
- operating-system: 'ubuntu-latest'
17+
silverstripe-version: '4.0'
18+
php-version: '8.0'
19+
- operating-system: 'ubuntu-latest'
20+
silverstripe-version: '4.0'
21+
php-version: '7.4'
22+
23+
name: SS ${{ matrix.silverstripe-version }}, PHP ${{ matrix.php-version }}
24+
runs-on: ${{ matrix.operating-system }}
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: php-actions/composer@v6
28+
with:
29+
command: update
30+
--with silverstripe/framework:^${{ matrix.silverstripe-version }}
31+
php_version: ${{ matrix.php-version }}
32+
php_extensions: intl
33+
- run: |
34+
./vendor/bin/phpunit -c phpunit.xml.dist \
35+
--coverage-clover ./coverage.xml

.github/workflows/t.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "Annotate & Tidy"
2+
3+
on:
4+
push:
5+
branches:
6+
- "feature/*"
7+
- "release/*"
8+
- "develop"
9+
10+
jobs:
11+
12+
tidy:
13+
runs-on: 'ubuntu-latest'
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: php-actions/composer@v6
17+
with:
18+
command: update --with silverstripe/framework:^5.0
19+
php_version: 8.1
20+
php_extensions: xdebug intl
21+
- name: Generate Code Coverage
22+
run: |
23+
XDEBUG_MODE=coverage \
24+
./vendor/bin/phpunit -c phpunit.xml.dist \
25+
--coverage-clover ./coverage.xml
26+
- name: Annotate with Metrics
27+
run: |
28+
find src -name "*.php" | xargs ./vendor/bin/metrics annotate ./coverage.xml
29+
- name: Tidy Source Code
30+
run: |
31+
find tests -name "*.php" | xargs ./vendor/bin/phptidy.php replace
32+
find src -name "*.php" | xargs ./vendor/bin/phptidy.php replace
33+
- name: Push Back Changes
34+
run: |
35+
git diff --exit-code src tests || ( \
36+
git config user.name github-actions && \
37+
git config user.email [email protected] && \
38+
git add src && git add tests && \
39+
git commit -m "tidy" && \
40+
git push \
41+
)

.github/workflows/v.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Github Autorelease"
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
10+
release:
11+
name: "Create Release"
12+
runs-on: "ubuntu-latest"
13+
14+
steps:
15+
- uses: "marvinpinto/action-automatic-releases@latest"
16+
with:
17+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
18+
prerelease: false
19+
20+

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/logicbrush/silverstripe-userforms-utils/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/logicbrush/silverstripe-userforms-utils/?branch=master)
66
[![License](https://poser.pugx.org/logicbrush/silverstripe-userforms-utils/license)](LICENSE)
77

8-
A collection of utilities for the Silverstripe CMS UserForms module. This includes a shortcode to insert a user
9-
form into any content area and a user form widget.
8+
A collection of utilities for the Silverstripe CMS UserForms module. This
9+
includes a shortcode to insert a user form into any content area and a user form
10+
widget.
1011

1112
## Requirements
1213

@@ -23,8 +24,9 @@ composer require "logicbrush/silverstripe-userforms-utils"
2324

2425
To use the form shortcode we insert `[userform id="x"]` in a HTMLText area where `x` is the user form page ID.
2526

26-
By default the UserForms module CSS and Javascript requirements will be loaded when using the shortcode. This can
27-
be turned off by setting the following in a `yml` config file:
27+
By default the UserForms module CSS and Javascript requirements will be loaded
28+
when using the shortcode. This can be turned off by setting the following in a
29+
`yml` config file:
2830

2931
```yml
3032
Logicbrush\UserFormsUtils\Shortcodes\UserFormShortcodeProvider:

0 commit comments

Comments
 (0)