Skip to content

release 0.8.1

release 0.8.1 #773

Workflow file for this run

# GitHub Action for CodeIgniter
name: Testing Kalkun
on:
push:
branches:
- master
- devel
- 'release-**'
- 'feature-**'
pull_request:
branches: [ master, devel ]
jobs:
test:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.2']
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, curl, dom
coverage: xdebug #optional
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
character set server: 'utf8' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld
collation server: 'utf8_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
mysql version: '5.7' # Optional, default value is "latest". The version of the MySQL
mysql database: 'kalkun' # Optional, default value is "test". The specified database which will be create
mysql root password: password # Required if "mysql user" is empty, default is empty. The root superuser password
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer update
composer install --no-progress --prefer-dist --optimize-autoloader
- name: Verify mysql connection
run: |
while ! mysqladmin ping -h"127.0.0.1" -P"3306" --silent; do
sleep 1
done
- name: Download Gammu DB Schema
uses: wei/wget@v1
with:
args: -O gammu.sql https://raw.githubusercontent.com/gammu/gammu/master/docs/sql/mysql.sql
- name: Import Gammu DB Schema
run: mysql -h"127.0.0.1" -P"3306" -uroot -ppassword kalkun < gammu.sql
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text -c application/tests
check-code:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.2']
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, curl, dom
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer update
composer install --no-progress --prefer-dist --optimize-autoloader
sudo apt-get update
# html-beautify from the debian package doesn't work for some reason
# sudo apt-get install -y node-js-beautify
# Install npm and install js-beautify from there
sudo apt-get install -y npm
sudo npm update --verbose -g npm
sudo npm install --verbose -g js-beautify
- id: check_strict_comparison
name: Check that strict comparison operators are used everywhere
run: |
git checkout composer.lock
git status
utils/fix_code_style.sh strict
- id: check_style
name: Check that code follows Guidelines
if: always()
run: |
git checkout composer.lock
git status
utils/fix_code_style.sh git-diff
- name: Archive artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: Code style issues to fix
path: 'code_style_check*'
if-no-files-found: ignore
check-translation:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.2']
runs-on: ${{ matrix.operating-system }}
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, curl, dom
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer update
composer install --no-progress --prefer-dist --optimize-autoloader
- id: translation
name: Check translations
run: |
mkfifo pipe
tee translation_check_output.txt < pipe &
./utils/check_translation.php all > pipe
- name: Archive artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: Translation check output
path: 'translation_check_output.*'
if-no-files-found: ignore