mirror of
https://github.com/godotengine/godot-website.git
synced 2026-01-04 06:09:55 +03:00
Set up continuous integration using GitHub Actions
This also uses the unofficial Bash strict mode for shell scripts.
This commit is contained in:
52
.github/workflows/ci.yml
vendored
Normal file
52
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Continuous integration
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.3'
|
||||
tools: composer:v1
|
||||
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_mysql, xml, zip
|
||||
# Disable Xdebug to improve performance.
|
||||
coverage: none
|
||||
|
||||
- name: Install October and set up MySQL database
|
||||
run: |
|
||||
sudo systemctl start mysql
|
||||
echo -e '[client]\nuser="root"\npassword="root"' > "$HOME/.my.cnf"
|
||||
mysql -e 'CREATE DATABASE IF NOT EXISTS `database`;'
|
||||
# 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';"
|
||||
|
||||
mkdir -p october
|
||||
pushd october
|
||||
php -r "eval('?>'.file_get_contents('https://octobercms.com/api/installer'));"
|
||||
php artisan key:generate
|
||||
# Set up the database.
|
||||
sed -i "s/'password' => ''/'password' => 'root'/g" config/database.php
|
||||
sed -i "s/'activeTheme' => 'demo'/'activeTheme' => 'godotengine'/g" config/cms.php
|
||||
php artisan october:up
|
||||
|
||||
cp -r ../plugins/* plugins
|
||||
cp -r ../themes/* themes
|
||||
php artisan plugin:refresh paulvonzimmerman.patreon
|
||||
env -C plugins/paulvonzimmerman/patreon composer install
|
||||
php artisan plugin:refresh pikanji.agent
|
||||
php artisan plugin:refresh rainlab.blog
|
||||
php artisan plugin:refresh serenitynow.cacheroute
|
||||
php artisan plugin:refresh sobored.rss
|
||||
|
||||
- name: Run Lighthouse CI
|
||||
run: |
|
||||
npm install @lhci/cli@0.6.x
|
||||
npx lhci autorun
|
||||
Reference in New Issue
Block a user