-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Remark Lint on Pull Request | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**/*.md' | ||
push: | ||
paths: | ||
- '**/*.md' | ||
|
||
jobs: | ||
remark-lint: | ||
name: runner / remark-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install remark presets | ||
run: npm install remark-cli remark-preset-lint-consistent remark-preset-lint-recommended remark-lint-list-item-indent | ||
shell: bash | ||
- name: Run remark | ||
run: npx remark . --output --use remark-preset-lint-consistent --use remark-preset-lint-recommended --use remark-lint-list-item-indent | ||
- name: Check for linting errors | ||
run: | | ||
npx remark . --use remark-preset-lint-consistent --use remark-preset-lint-recommended --use remark-lint-list-item-indent | ||
continue-on-error: false | ||
- name: Git commit | ||
if: success() | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add . | ||
git reset package.json | ||
git reset package-lock.json | ||
git reset node_modules | ||
git commit -m "Update src from remark-lint" || echo "No changes to commit" | ||
git pull origin $(git rev-parse --abbrev-ref HEAD) --rebase --autostash | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: php-cbf | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
tools: cs2pr, phpcbf | ||
|
||
- name: Run phpcbf | ||
run: phpcbf . | ||
continue-on-error: true | ||
- name: Git commit | ||
run: | | ||
git config user.name "GitHub Actions" | ||
git config user.email "" | ||
git add src | ||
git commit -m "Update src from PHP Codesniffer" || echo "No changes to commit" | ||
git pull origin $(git rev-parse --abbrev-ref HEAD) --rebase --autostash | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: php-cs | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
tools: cs2pr, phpcs | ||
|
||
- name: Run phpcs | ||
run: phpcs -q --report=checkstyle src | cs2pr | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: php-md | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
tools: cs2pr, phpmd | ||
- name: Run phpmd | ||
run: phpmd src github phpmd.xml --not-strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: php-unit | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: php-actions/composer@v6 | ||
with: | ||
php_version: "7.4" | ||
php_extensions: redis exif mongodb intl pdo_pgsql zip mysqli pdo_mysql pcntl gd gmp | ||
version: 2.x | ||
command: require symfony/test-pack | ||
- name: Install dependencies | ||
run: composer install | ||
- name: Run tests with coverage | ||
env: | ||
XDEBUG_MODE: coverage | ||
run: | | ||
phpunit --bootstrap ./tests/bootstrap.php --configuration phpunit.xml --coverage-html ./coverage --coverage-text | tee coverage.txt |