Skip to content

Commit

Permalink
Update php.yml (#5)
Browse files Browse the repository at this point in the history
* Update php.yml
* Update composer.json
  • Loading branch information
lintaba authored Apr 26, 2022
1 parent 0116f28 commit acd7c69
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 17 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,55 @@ name: PHP Composer

on:
push:
branches: [ master ]
paths-ignore:
- '*.md'
- '*.xml'
pull_request:
branches: [ master ]
paths-ignore:
- '*.md'
- '*.xml'

jobs:
build:
name: PHP ${{ matrix.php }}-${{ matrix.os }}

runs-on: ubuntu-latest

strategy:
matrix:
os:
- ubuntu-latest

php:
- 8.0
- 8.1

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: date.timezone='UTC'
coverage: pcov
tools: composer:v2

- name: Determine composer cache directory on Linux
if: matrix.os == 'ubuntu-latest'
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
- name: Cache dependencies installed with composer
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-
php${{ matrix.php }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@
],
"require": {
"php": "^8.0|^8.1",
"illuminate/support": "^8.0|^9.0",
"orchid/platform": "^12.0"
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"phpunit/phpunit": "~9.0",
"orchestra/testbench": "~5|~6",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
Expand Down
15 changes: 9 additions & 6 deletions src/OrchidTablesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ protected function bootForConsole(): void
], 'orchid-tables.config');

$this->publishes([
__DIR__.'/../public/' => base_path('public/vendor/lintaba-orchid-tables/')
__DIR__ . '/../public/' => base_path('public/vendor/lintaba-orchid-tables/')
], ['orchid-tables-assets','laravel-assets']);

}

/**
Expand All @@ -90,10 +89,14 @@ private function registerResources(): self
{
View::composer('platform::app', function () {
$this->dashboard
->registerResource('scripts',
mix('/js/bulkselect.js', 'vendor/lintaba-orchid-tables'))
->registerResource('stylesheets',
mix('/css/bulkselect.css', 'vendor/lintaba-orchid-tables'));
->registerResource(
'scripts',
mix('/js/bulkselect.js', 'vendor/lintaba-orchid-tables')
)
->registerResource(
'stylesheets',
mix('/css/bulkselect.css', 'vendor/lintaba-orchid-tables')
);
});

return $this;
Expand Down

0 comments on commit acd7c69

Please sign in to comment.