-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #759 from liberu-genealogy/sweep/add_latest_node_v…
…ersion_which_is_version Sweep: Add latest Node.js version 20 to run-tests.yml and add npm install and npm run build
- Loading branch information
Showing
1 changed file
with
40 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,45 @@ | ||
name: Test install | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest] | ||
php: [8.1, 8.2] | ||
laravel: [10.*] | ||
include: | ||
- laravel: 10.* | ||
testbench: 8.* | ||
- laravel: 9.* | ||
testbench: 7.* | ||
exclude: | ||
- php: 8.2 | ||
laravel: 9.* | ||
node-version: [16, 18, 20] | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
name: run-tests | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
runs-on: ${{ matrix.os }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.3' | ||
extensions: mbstring, dom, fileinfo, mysql, bcmath, zip | ||
|
||
- name: Copy .env | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
|
||
- name: Generate key | ||
run: php artisan key:generate | ||
|
||
- name: Run Migrations | ||
run: php artisan migrate | ||
- name: Run Seeding | ||
run: php artisan db:seed | ||
|
||
# - name: Execute tests (Unit and Feature tests) via PHPUnit | ||
# run: php artisan test --coverage-text | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | ||
coverage: none | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | ||
composer update --prefer-dist --no-interaction --no-progress | ||
- name: npm install | ||
run: npm install | ||
- name: npm run build | ||
run: npm run build | ||
- name: Execute tests | ||
run: vendor/bin/phpunit |