Skip to content

Commit a65853e

Browse files
committed
Initial commit.
0 parents  commit a65853e

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/phpcs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Backdrop CMS coding standards
2+
3+
jobs:
4+
phpcs:
5+
name: Run phpcs
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Setup PHP with CodeSniffer tool
9+
uses: shivammathur/setup-php@v2
10+
with:
11+
php-version: '8.1'
12+
tools: phpcs
13+
14+
# The checkout action refuses to put it outside, so we have to do it in
15+
# two steps.
16+
- name: Checkout coding standard
17+
uses: actions/checkout@v4
18+
with:
19+
repository: backdrop-ops/phpcs
20+
ref: 1.0.0-beta1
21+
path: phpcs
22+
23+
- name: Move standard outside current dir
24+
run: mv phpcs ..
25+
26+
- name: Checkout code with full depth
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
31+
- uses: thenabeel/action-phpcs@v8
32+
with:
33+
files: "**.php,**.inc,**.module,**.install,**.profile,**.test"
34+
standard: ../phpcs/Backdrop
35+
fail_on_warnings: false

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Backdrop GHA
2+
3+
This is currently an experiemental repository to explore the feasibility of
4+
using a shared repo for some basic GitHub Actions that can be used by contrib
5+
module maintainers.
6+
7+
Right now only the simplest implementation is included for PHPCS linting with
8+
no customization.
9+
10+
In the future it may be expanded to include other options such as functional
11+
tests, with minor customizations permitted via inputs when calling the action
12+
or workflow.

0 commit comments

Comments
 (0)