Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Github actions workflows #48

Merged
merged 4 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ name: Run Tests

on:
push:
branches: [ main ]
pull_request:
branches: [main]
pull_request_target:
types: [labeled]
branches: [main]

jobs:
test:
name: PHP ${{ matrix.php }}, Laravel ${{ matrix.laravel }}
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test')

strategy:
max-parallel: 1
matrix:
php: [ 7.4, 8.0, 8.1 ]
laravel: [ 8.*, 9.* ]
php: [7.4, 8.0, 8.1]
laravel: [8.*, 9.*]
include:
- php: 7.4
laravel: 8.*
Expand Down Expand Up @@ -47,7 +50,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
104 changes: 52 additions & 52 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
name: Lint

on:
push:
branches: [ main ]
pull_request:
push:
branches: [main]
pull_request_target:
types: [labeled]
branches: [main]

jobs:
phpcs:
name: PHPCS

continue-on-error: false

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_LICENSE_KEY }}"
composer upgrade --no-interaction --no-suggest

- name: PHP-8 compatible PHPCS
run: vendor/bin/phpcs

tlint:
name: TLint

continue-on-error: false

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_LICENSE_KEY }}"
composer install --no-interaction --no-suggest

- name: Tlint Lint
run: vendor/bin/tlint
phpcs:
name: PHPCS
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
continue-on-error: false

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_LICENSE_KEY }}"
composer upgrade --no-interaction --no-suggest

- name: PHP-8 compatible PHPCS
run: vendor/bin/phpcs

tlint:
name: TLint
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
continue-on-error: false

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_LICENSE_KEY }}"
composer install --no-interaction --no-suggest

- name: Tlint Lint
run: vendor/bin/tlint