Skip to content

Commit

Permalink
Update and rename run-tests.yml to tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisdelicata authored Jun 8, 2024
1 parent 3cbec47 commit 91bb4c3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 45 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/run-tests.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'


- name: Start database
run: sudo /etc/init.d/mysql start

- name: Create database
run: mysql -e "CREATE DATABASE IF NOT EXISTS liberu;" -uroot -proot

- name: Copy environment file
run: cp .env.testing .env

- name: Install dependencies
run: composer install

- name: Generate application key
run: php artisan key:generate

- name: Run database migrations
run: php artisan migrate

- name: Seed database
run: php artisan db:seed

- name: Run tests
run: php artisan test

0 comments on commit 91bb4c3

Please sign in to comment.