-
-
Notifications
You must be signed in to change notification settings - Fork 47
29 lines (29 loc) · 962 Bytes
/
run-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Checks
on: [ pull_request ]
jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: start mysql
run: sudo systemctl start mysql.service
- name: create database
run: mysql -uroot -h127.0.0.1 -proot -e 'CREATE DATABASE IF NOT EXISTS testing;'
- name: install mysql
run: sudo apt update && sudo apt install -y php-mysql
- name: Setup PHP environment
uses: nanasess/[email protected]
with:
php-version: '7.4'
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run tests
run: |
cp .env.example .env
php artisan key:generate
php vendor/bin/phpunit
- name: delete database
run: mysql -uroot -h127.0.0.1 -proot -e "drop database testing;"
- name: stop mysql
run: sudo systemctl stop mysql.service