Skip to content

Commit

Permalink
Merge pull request #759 from liberu-genealogy/sweep/add_latest_node_v…
Browse files Browse the repository at this point in the history
…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
curtisdelicata authored Jun 8, 2024
2 parents e6a2f84 + a4937c2 commit baedd7c
Showing 1 changed file with 40 additions and 34 deletions.
74 changes: 40 additions & 34 deletions .github/workflows/run-tests.yml
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

0 comments on commit baedd7c

Please sign in to comment.