Skip to content

Commit

Permalink
Add GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
casperboone committed Jul 9, 2021
1 parent 7aed503 commit 44af88b
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 12 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tests

on: [ push, pull_request ]

jobs:
tests:
runs-on: ubuntu-latest

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

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none

- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-suggest

- name: Install NPM dependencies
run: npm ci

- name: Compile assets
run: npm run production

- name: Execute tests
run: php artisan test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AddDetailsColumnToLog extends Migration
public function up()
{
Schema::table('logs', function (Blueprint $table) {
$table->text('details')->after('ip');
$table->text('details')->after('ip')->nullable();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AddEmailTextToEvents extends Migration
public function up()
{
Schema::table('events', function (Blueprint $table) {
$table->text('email_text')->after('twoseat_capacity');
$table->text('email_text')->nullable()->after('twoseat_capacity');
});
}

Expand Down
53 changes: 43 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</filter>
<php>
<server name="APP_ENV" value="testing"/>
<server name="APP_KEY" value="base64:NXoQgjw2ZlOxnGbo5ZRhYgTdM6xLYsgYElNAgcTQJkE="/>
<server name="BCRYPT_ROUNDS" value="4"/>
<server name="CACHE_DRIVER" value="array"/>
<server name="DB_CONNECTION" value="sqlite"/>
Expand Down

0 comments on commit 44af88b

Please sign in to comment.