mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-29 00:31:09 +00:00
4ff9b95ade
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: MediaWiki CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
test:
|
|
name: Test and lint
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
php-versions: ['7.4']
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
composer validate
|
|
npm install --save-dev
|
|
composer install --prefer-dist --no-progress
|
|
|
|
# Bypass the phpcbf non-standard exit code
|
|
- name: Check PHP
|
|
run: |
|
|
sh ./bin/phpcbf.sh
|
|
composer fix
|
|
composer test
|
|
|
|
- name: Check Javascript
|
|
run: |
|
|
npm run lint:fix:js
|
|
npm run lint:js
|
|
|
|
- name: Check CSS/LESS
|
|
run: |
|
|
npm run lint:fix:styles
|
|
npm run lint:styles
|
|
|
|
- name: Check i18n
|
|
run: |
|
|
npm run lint:i18n
|
|
|
|
# Only patch code when it is a push event
|
|
- name: Push the changes
|
|
if: github.event_name == 'push'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git config --global user.name "github-actions"
|
|
git config --global user.email "github-actions@users.noreply.github.com"
|
|
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
|
git add .
|
|
git commit -am "ci: lint code to MediaWiki standards" -m "Check commit and GitHub actions for more details" || echo "No changes to commit"
|
|
git pull --rebase
|
|
git push
|