Style cleanup adding newlines

Seems to be the unofficial GitHub Actions YAML style and arguably makes things a lot more readable if you have a lot of steps…
This commit is contained in:
rugk 2021-10-02 00:41:54 +02:00 committed by GitHub
parent 3f7bceb862
commit e2ae0da4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -2,6 +2,7 @@ name: Tests
on: [push] on: [push]
jobs: jobs:
Composer: Composer:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -11,6 +12,7 @@ jobs:
run: composer validate run: composer validate
- name: Install dependencies - name: Install dependencies
run: composer install --prefer-dist --no-dev run: composer install --prefer-dist --no-dev
PHPunit: PHPunit:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -19,7 +21,10 @@ jobs:
name: PHP ${{ matrix.php-versions }} unit tests on ${{ matrix.operating-system }} name: PHP ${{ matrix.php-versions }} unit tests on ${{ matrix.operating-system }}
env: env:
extensions: gd, sqlite3 extensions: gd, sqlite3
steps: steps:
# let's get started!
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -48,9 +53,11 @@ jobs:
# composer cache # composer cache
- name: Remove composer lock - name: Remove composer lock
run: rm composer.lock run: rm composer.lock
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "::set-output name=dir::$(composer config cache-files-dir)"
# http://man7.org/linux/man-pages/man1/date.1.html # http://man7.org/linux/man-pages/man1/date.1.html
# https://github.com/actions/cache#creating-a-cache-key # https://github.com/actions/cache#creating-a-cache-key
- name: Get Date - name: Get Date
@ -58,6 +65,7 @@ jobs:
run: | run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash shell: bash
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
@ -75,20 +83,26 @@ jobs:
- name: Run unit tests - name: Run unit tests
run: ../vendor/bin/phpunit --no-coverage run: ../vendor/bin/phpunit --no-coverage
working-directory: tst working-directory: tst
Mocha: Mocha:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: '12' node-version: '12'
- name: Setup Mocha - name: Setup Mocha
run: npm install -g mocha run: npm install -g mocha
- name: Setup Node modules - name: Setup Node modules
run: npm install run: npm install
working-directory: js working-directory: js
- name: Run unit tests - name: Run unit tests
run: mocha run: mocha
working-directory: js working-directory: js