-
-
Notifications
You must be signed in to change notification settings - Fork 308
88 lines (76 loc) · 2.47 KB
/
php_dist.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: PHP Dist
on:
workflow_call:
permissions:
contents: read
jobs:
php_dist:
name: ${{ matrix.php-version }} - ${{ matrix.sql-versions }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- 8.2
sql-versions:
- mariadb
- postgresql
- sqlite
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
extensions: bcmath, curl, dom, gd, imagick, json, libxml, mbstring, pcntl, pdo, pdo_sqlite, pdo_mysql, pdo_pgsql, pgsql, sqlite3, zip
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set Up Imagick, FFmpeg & Exiftools
run: |
sudo apt-get update
sudo apt-get --fix-broken install
sudo apt-get -y install ffmpeg libimage-exiftool-perl
- name: setup Databases
run: |
sudo service mysql start
touch database/database.sqlite
mysql -uroot -proot -e 'create database homestead_test;'
- name: Setup PHP Action
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # 2.31.1
with:
php-version: ${{ matrix.php-version }}
extensions: ${{ env.extensions }}
tools: pecl, composer
- name: Build Dist
run: |
make dist-clean
- name: copy Env
run: |
cp .github/workflows/.env.${{ matrix.sql-versions }} Lychee/.env
- name: setup MySQL Database with v3
run: |
mysql -uroot -proot homestead_test < .github/workflows/v3.sql
- name: Generate secure key & Migrate & go backward
run: |
cd Lychee
pwd
php artisan key:generate
php artisan migrate
php artisan migrate:rollback