Replace Travis with Github actions
Two workflows have been added,
* PHP build - Runs tests on version 7.2, 7.3, also runs phpcs
* Node.js build - Runs tests on version 8.x, 10.x, 12.x, also
runs ESLint
Bug: T218639
This commit is contained in:
27
.github/workflows/node.yml
vendored
Normal file
27
.github/workflows/node.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: Node.js build
|
||||||
|
on:
|
||||||
|
[pull_request, push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-v: [8.x, 10.x, 12.x]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node.js ${{ matrix.node-v }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-v }}
|
||||||
|
|
||||||
|
- name: Install package.json dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Run Node.js test suite
|
||||||
|
run: npm test
|
||||||
|
|
||||||
|
- name: Run linting
|
||||||
|
run: npm run lint
|
||||||
22
.github/workflows/php.yml
vendored
Normal file
22
.github/workflows/php.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: PHP build
|
||||||
|
on:
|
||||||
|
[pull_request, push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php: [7.2, 7.3]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --prefer-dist --no-interaction --ansi
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: php${{ matrix.php }} ./vendor/bin/phpunit tests/php/*
|
||||||
|
|
||||||
|
- name: Running phpcs
|
||||||
|
run: composer run-script cs
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- 8
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
@@ -1,42 +1,51 @@
|
|||||||
{
|
{
|
||||||
"name": "wikimedia/language-data",
|
"name": "wikimedia/language-data",
|
||||||
"description": "CLDR based language data and utilities.",
|
"description": "CLDR based language data and utilities.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cldr", "cldr-data", "internationalization", "localization", "l10n"
|
"cldr",
|
||||||
],
|
"cldr-data",
|
||||||
"license": "GPL-2.0-or-later",
|
"internationalization",
|
||||||
"authors": [{
|
"localization",
|
||||||
"name": "Santhosh Thottingal",
|
"l10n"
|
||||||
"email": "santhosh.thottingal@gmail.com"
|
],
|
||||||
}, {
|
"license": "GPL-2.0-or-later",
|
||||||
"name": "Amir Aharoni"
|
"authors": [
|
||||||
}, {
|
{
|
||||||
"name": "Niklas Laxström",
|
"name": "Santhosh Thottingal",
|
||||||
"email": "niklas.laxstrom@gmail.com"
|
"email": "santhosh.thottingal@gmail.com"
|
||||||
}],
|
},
|
||||||
"type": "library",
|
{
|
||||||
"require": {
|
"name": "Amir Aharoni"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Niklas Laxström",
|
||||||
|
"email": "niklas.laxstrom@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"require": {
|
||||||
"php": ">=7.2"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "8.*",
|
"phpunit/phpunit": "8.*",
|
||||||
"mediawiki/mediawiki-codesniffer": "29.0.0"
|
"mediawiki/mediawiki-codesniffer": "29.0.0"
|
||||||
},
|
},
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/wikimedia/language-data/issues",
|
"issues": "https://github.com/wikimedia/language-data/issues",
|
||||||
"irc": "irc://irc.freenode.net/mediawiki-i18n"
|
"irc": "irc://irc.freenode.net/mediawiki-i18n"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Wikimedia\\LanguageData\\": "src/"
|
"Wikimedia\\LanguageData\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"fix": "phpcbf",
|
"fix": "phpcbf",
|
||||||
|
"cs": "phpcs -p",
|
||||||
"test": [
|
"test": [
|
||||||
"composer validate --no-interaction",
|
"composer validate --no-interaction",
|
||||||
"phpunit tests/php/*",
|
"phpunit tests/php/*",
|
||||||
"phpcs -p"
|
"phpcs -p"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
804
package-lock.json
generated
804
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,7 @@
|
|||||||
},
|
},
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha tests/js/*.js"
|
"test": "mocha tests/js/*.js",
|
||||||
|
"lint": "eslint src/*.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user