-
-
Notifications
You must be signed in to change notification settings - Fork 320
92 lines (79 loc) · 2.56 KB
/
php_no_legacy_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
89
90
91
92
name: Check JS
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.4
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@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Removing legacy files
run: |
sh scripts/delete_legacy.sh
- 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@9e72090525849c5e82e596468b86eb55e9cc5401 # 2.32.0
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