-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.12 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This workflow is used for testing the phpcs action of this repository.
name: Test action
on: pull_request
jobs:
test:
name: Setup php
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: Setup PHP, with composer and extensions
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: '8.3'
tools: composer:v2
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, gd, exif, iconv
- name: Setup Drupal
uses: bluehorndigital/[email protected]
with:
version: '^10.2'
path: drupal
- name: Install phpcs
working-directory: drupal
run: composer require squizlabs/php_codesniffer dealerdirect/phpcodesniffer-composer-installer
- name: Copy phpcs rules
uses: canastro/[email protected]
with:
source: "test-assets/phpcs.xml"
target: "drupal/phpcs.xml"
- name: Run phpcs
uses: ./
with:
path: drupal
reviewdog_token: ${{ secrets.GITHUB_TOKEN }}