Skip to content

Commit

Permalink
Merge pull request #31 from FitzwilliamMuseum/issue25
Browse files Browse the repository at this point in the history
Update action
  • Loading branch information
portableant authored Jul 24, 2022
2 parents a76363b + caecb9c commit ff5f02f
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Laravel
name: PHP Composer

on:
push:
Expand All @@ -7,26 +7,30 @@ on:
branches: [ main ]

jobs:
laravel-tests:
build:

runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v2
- 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: Install NPM Dependencies
run: npm install
- name: Generate key
run: php artisan key:generate
- name: Generate dev npm app.js
run: npm run dev
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit
- uses: actions/checkout@v2

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

# - name: Run test suite
# run: composer run-script test

0 comments on commit ff5f02f

Please sign in to comment.