Improve workflow formatting (#170)

This commit is contained in:
Chocobo1 2021-08-13 03:08:13 +08:00 committed by GitHub
parent 43be63daab
commit bd44c293dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,37 +4,39 @@ on: [pull_request, push]
jobs:
php:
name: Check PHP
runs-on: ubuntu-latest
strategy:
matrix:
php_versions: ["5.6", "latest"]
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
- name: compile
run: |
for file in *.php
do php -f "$file" > /dev/null
done
- name: checkout repository
uses: actions/checkout@v2
- name: setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
- name: compile
run: |
for file in *.php
do php -f "$file" > /dev/null
done
nodejs:
name: Check JS
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: setup nodejs
uses: actions/setup-node@v2
with:
node-version: '16'
- name: install tools
run: npm install
- name: lint code
run: npm run lint
- name: format code
run: |
npm run format
git diff --exit-code
- name: checkout repository
uses: actions/checkout@v2
- name: setup nodejs
uses: actions/setup-node@v2
with:
node-version: '16'
- name: install tools
run: npm install
- name: lint code
run: npm run lint
- name: format code
run: |
npm run format
git diff --exit-code