Skip to content

Commit cad5159

Browse files
authored
Merge pull request #15 from PHPCSStandards/feature/move-to-gh-actions
CI: switch to GitHub Actions
2 parents 2e36072 + f5901de commit cad5159

File tree

4 files changed

+56
-42
lines changed

4 files changed

+56
-42
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
/.gitattributes export-ignore
99
/.gitignore export-ignore
10-
/.travis.yml export-ignore
10+
/.github/ export-ignore
1111

1212
#
1313
# Auto detect text files and perform LF normalization

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
# Run on all pushes and pull requests.
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
# Also run this workflow on day 10 of every month as the repo isn't that active.
10+
schedule:
11+
- cron: '0 0 10 * *'
12+
13+
jobs:
14+
xmllint:
15+
name: 'Check install and XML'
16+
runs-on: ubuntu-latest
17+
18+
env:
19+
XMLLINT_INDENT: ' '
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: '7.4'
29+
coverage: none
30+
31+
# Install dependencies to make sure the PHPCS XSD file is available.
32+
- name: Install dependencies
33+
run: composer install --prefer-dist --no-interaction --no-progress
34+
35+
- name: Setup xmllint
36+
run: sudo apt-get install --no-install-recommends -y libxml2-utils
37+
38+
# Show violations inline in the file diff.
39+
# @link https://github.com/marketplace/actions/xmllint-problem-matcher
40+
- uses: korelstar/xmllint-problem-matcher@v1
41+
42+
# Validate the composer.json file.
43+
# @link https://getcomposer.org/doc/03-cli.md#validate
44+
- name: Validate Composer installation
45+
run: composer validate --no-check-all --strict
46+
47+
# Validate the xml file.
48+
# @link http://xmlsoft.org/xmllint.html
49+
- name: Validate against schema
50+
run: xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd PHPCSDev/ruleset.xml
51+
52+
# Check the code-style consistency of the xml file.
53+
- name: Check code style
54+
run: diff -B ./PHPCSDev/ruleset.xml <(xmllint --format "./PHPCSDev/ruleset.xml")

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PHPCSDevCS for developers of PHP_CodeSniffer sniffs
55
[![Release Date of the Latest Version](https://img.shields.io/github/release-date/PHPCSStandards/PHPCSDevCS.svg?maxAge=1800)](https://github.com/PHPCSStandards/PHPCSDevCS/releases)
66
:construction:
77
[![Latest Unstable Version](https://img.shields.io/badge/unstable-dev--master-e68718.svg?maxAge=2419200)](https://packagist.org/packages/phpcsstandards/phpcsdevcs#dev-master)
8-
[![Travis Build Status](https://travis-ci.com/PHPCSStandards/PHPCSDevCS.svg?branch=master)](https://travis-ci.com/PHPCSStandards/PHPCSDevCS)
8+
[![Build Status](https://github.com/PHPCSStandards/PHPCSDevCS/workflows/CI/badge.svg?branch=master)](https://github.com/PHPCSStandards/PHPCSDevCS/actions)
99
[![Last Commit to Unstable](https://img.shields.io/github/last-commit/PHPCSStandards/PHPCSDevCS/master.svg)](https://github.com/PHPCSStandards/PHPCSDevCS/commits/master)
1010

1111
[![Minimum PHP Version](https://img.shields.io/packagist/php-v/phpcsstandards/phpcsdevcs.svg?maxAge=3600)](https://packagist.org/packages/phpcsstandards/phpcsdevcs)

0 commit comments

Comments
 (0)