-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (32 loc) · 1.1 KB
/
php-unit.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
30
31
32
name: Checks
on: [ pull_request ]
jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # important!
- name: setup php
run: |
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo apt install -y php8.2-{common,cli,gd,curl,mysql,mbstring,dom,xml,simplexml}
curl -s https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
git submodule init
git submodule update --remote --merge
- name: Install dependencies
run: |
sudo systemctl start mysql.service
mysql -uroot -h127.0.0.1 -proot -e 'CREATE DATABASE IF NOT EXISTS testing;'
sudo apt update && sudo apt install -y php-mysql
composer install --prefer-dist --no-progress --no-suggest
- name: Run tests
run: |
cp .env.ci .env
touch database/database.sqlite
php artisan key:generate
php vendor/bin/phpunit