Update composer.lock #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TellerSDK | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-test: | |
name: Build | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
working-directory: ./ | |
steps: | |
- name: Setting MySql 8 | |
run: | | |
echo -e "Enable LOAD DATA LOCAL INFILE in my.cnf\n" | |
echo -e "SETTING secure-file-priv TO EMPTY STRING\n" | |
echo -e "[mysqld]\nsecure-file-priv=''" | sudo tee -a /etc/mysql/my.cnf | |
echo -e "SETTING local_infile TO ON\n" | |
echo -e "[mysqld]\nlocal_infile='ON'" | sudo tee -a /etc/mysql/my.cnf | |
echo -e "Start MYSQL service, it is off by default\n" | |
sudo systemctl enable mysql.service | |
sudo systemctl start mysql.service | |
echo -e "Creating TellerSDK Database\n" | |
mysql --host 127.0.0.1 -uroot -proot -e 'CREATE DATABASE IF NOT EXISTS tellersdk;' | |
echo -e "Check new settings\n" | |
mysql --host 127.0.0.1 -uroot -proot -e "SELECT @@global.secure_file_priv, @@global.local_infile" | |
working-directory: . | |
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e | |
with: | |
php-version: "8.1" | |
- uses: actions/checkout@v2 | |
- name: Copy .env | |
run: cp .env.example .env | |
- name: Install Dependencies | |
run: composer install | |
- name: Set Environment Variables | |
run: sed -i "s/TELLER_TEST_TOKEN=.*/TELLER_TEST_TOKEN=${{ secrets.TELLER_TEST_TOKEN }}/" .env | |
- name: Run Tests | |
run: ./vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml ; | |
# - name: PHPUnit Tests | |
# uses: php-actions/phpunit@v3 | |
# env: | |
# XDEBUG_MODE: coverage | |
# with: | |
# bootstrap: vendor/autoload.php | |
# configuration: phpunit.xml | |
# php_extensions: xdebug | |
# args: tests --coverage-clover ./coverage.xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |