forked from godotengine/godot-website
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 2.14 KB
/
ci.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
name: Continuous integration
on:
- push
- pull_request
jobs:
test:
name: Validate formatting and setup
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint and format CSS
run: |
npm ci
npm run lint
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.3"
tools: composer:v2
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_mysql, xml, zip
# Disable Xdebug to improve performance.
coverage: none
- name: Set up MySQL and install OctoberCMS
run: |
sudo systemctl start mysql
echo -e '[client]\nuser="root"\npassword="root"' > "$HOME/.my.cnf"
mysql -e "CREATE DATABASE IF NOT EXISTS october;"
# https://stackoverflow.com/questions/52364415/php-with-mysql-8-0-error-the-server-requested-authentication-method-unknown-to
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';"
# Explicitly allow all plugins to run scripts during installation.
composer config -g allow-plugins true
mkdir -p october
composer create-project october/october ./october "v1.0.474" --no-dev
pushd october
php artisan key:generate
# Copy project files.
cp -r ../themes/* themes
cp -r ../docker/php/config/* config
# Fix up the config for CI.
sed -i "s/'host' => 'mariadb'/'host' => 'localhost'/g" config/database.php
sed -i "s/'username' => 'godot'/'username' => 'root'/g" config/database.php
sed -i "s/'password' => 'godot'/'password' => 'root'/g" config/database.php
php artisan october:up
php artisan october:fresh
php artisan plugin:install paulvonzimmerman.patreon
php artisan plugin:install pikanji.agent
php artisan plugin:install rainlab.blog
php artisan plugin:install sobored.rss
- name: Run Lighthouse CI
run: |
npm install @lhci/cli@0.6.x
npx lhci autorun