-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.64 KB
/
tests.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
container: escolasoft/php:8.2-heseya
services:
mysql:
image: mariadb:10.7
env:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: database
MYSQL_PASSWORD: secret
steps:
- name: Instantiate package
uses: actions/checkout@v2
- name: Install dependencies
run: composer install --no-ansi --no-interaction --no-progress
- name: Copy env
run: cp .env.testing .env
- name: Generate keys
run: php artisan key:generate
- name: Migrations
run: php artisan migrate:fresh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: test-vendor
path: |
vendor/
.env
retention-days: 1
- name: Run tests
run: php -dpcov.enabled=1 -dpcov.exclude="~vendor~" ./vendor/bin/pest --coverage
style:
runs-on: ubuntu-latest
container: escolasoft/php:8.2-heseya
if: github.ref_name != 'main' && github.ref_name != 'develop'
steps:
- name: Instantiate package
uses: actions/checkout@v2
- name: Install dependencies
run: composer install --no-ansi --no-interaction --no-progress
- name: Copy env
run: cp .env.testing .env
- name: Generate keys
run: php artisan key:generate
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: style-vendor
path: |
vendor/
.env
retention-days: 1
- name: Style
run: ./vendor/bin/pint --test