From 2faee7501c2da77b715fab82cc3bdcdb5cdaa043 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 01:28:30 +0000 Subject: [PATCH 01/23] Authenticate with mysql in build --- .github/workflows/laravel.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index ecacd2714..6cffb1d0c 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -32,11 +32,11 @@ jobs: run: chmod -R 777 storage bootstrap/cache - name: Create Database run: | - mysql -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" - mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" + mysql -h mysql -u root -e "SET GLOBAL innodb_file_per_table = 1;" + mysql -h mysql -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" + mysql -h mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" + mysql -h mysql -u root -e "CREATE DATABASE TEST;" + mysql -h mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" if [[ -f /etc/mysql/my.cnf ]]; then sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; fi - name: Execute tests (Unit and Feature tests) via PHPUnit env: From 89f1971d52d8e90fcbeeab677af860a60e752d93 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 01:40:13 +0000 Subject: [PATCH 02/23] Map mysql port to host --- .github/workflows/laravel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 6cffb1d0c..118f8e852 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -17,9 +17,9 @@ jobs: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: TEST ports: - - 3306 + - 3306:3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - + steps: - uses: actions/checkout@v2 - name: Copy .env From a4090cf7825f3e847e6877db93aee9efdfbcbe4a Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 01:49:09 +0000 Subject: [PATCH 03/23] Add wait for mysql to start --- .github/workflows/laravel.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 118f8e852..fae29578a 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -30,13 +30,18 @@ jobs: run: php artisan key:generate - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache + - name: Verify MariaDB connection + run: | + while ! mysqladmin ping --silent; do + sleep 1 + done - name: Create Database run: | - mysql -h mysql -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -h mysql -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" - mysql -h mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" - mysql -h mysql -u root -e "CREATE DATABASE TEST;" - mysql -h mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" + mysql -u root -e "SET GLOBAL innodb_file_per_table = 1;" + mysql -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" + mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" + mysql -u root -e "CREATE DATABASE TEST;" + mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" if [[ -f /etc/mysql/my.cnf ]]; then sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; fi - name: Execute tests (Unit and Feature tests) via PHPUnit env: From 779357670e81f28092c4a943aad5728fe2695c44 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 04:06:55 +0000 Subject: [PATCH 04/23] Remove verify step as it's done in the healthcheck --- .github/workflows/laravel.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index fae29578a..29c8b15cb 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -30,18 +30,13 @@ jobs: run: php artisan key:generate - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache - - name: Verify MariaDB connection - run: | - while ! mysqladmin ping --silent; do - sleep 1 - done - name: Create Database run: | - mysql -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" - mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" + mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" + mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" + mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_large_prefix = 1;" + mysql -h 127.0.0.1 -u root -e "CREATE DATABASE TEST;" + mysql -h 127.0.0.1 -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" if [[ -f /etc/mysql/my.cnf ]]; then sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; fi - name: Execute tests (Unit and Feature tests) via PHPUnit env: From 551a2cbcaa8e2e8bb6e3b7603647a1dbd3f88ea8 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 04:17:27 +0000 Subject: [PATCH 05/23] Change version to match compose and check innodb_fast_shutdown --- .github/workflows/laravel.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 29c8b15cb..f71922a48 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest services: mysql: - image: mariadb:10.4 + image: mariadb:10 env: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: TEST @@ -32,6 +32,7 @@ jobs: run: chmod -R 777 storage bootstrap/cache - name: Create Database run: | + mysql -h 127.0.0.1 -u root -e "show variables like 'innodb_fast_shutdown';" mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_large_prefix = 1;" From 2f6851f210e7493add48f2d281db452bf2c0b8eb Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 04:22:54 +0000 Subject: [PATCH 06/23] Removing innodb_file_format as it's deprecated --- .github/workflows/laravel.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index f71922a48..3ab71565e 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -32,9 +32,7 @@ jobs: run: chmod -R 777 storage bootstrap/cache - name: Create Database run: | - mysql -h 127.0.0.1 -u root -e "show variables like 'innodb_fast_shutdown';" mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_large_prefix = 1;" mysql -h 127.0.0.1 -u root -e "CREATE DATABASE TEST;" mysql -h 127.0.0.1 -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" From 9dc0dc67a82672792c1cd5d923d547b0fcc59403 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 04:26:38 +0000 Subject: [PATCH 07/23] Removing innodb_large_prefix because it's also deprecated --- .github/workflows/laravel.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 3ab71565e..e44f2bec4 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -33,7 +33,6 @@ jobs: - name: Create Database run: | mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_large_prefix = 1;" mysql -h 127.0.0.1 -u root -e "CREATE DATABASE TEST;" mysql -h 127.0.0.1 -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" if [[ -f /etc/mysql/my.cnf ]]; then sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; fi From 72f019cad2bdda4a00df1b4053bed73657cc31f2 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 04:31:18 +0000 Subject: [PATCH 08/23] Mariadb creates the TEST table at startup --- .github/workflows/laravel.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index e44f2bec4..3bb3d535b 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -33,7 +33,6 @@ jobs: - name: Create Database run: | mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -h 127.0.0.1 -u root -e "CREATE DATABASE TEST;" mysql -h 127.0.0.1 -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" if [[ -f /etc/mysql/my.cnf ]]; then sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; fi - name: Execute tests (Unit and Feature tests) via PHPUnit From 78aed5645ace27badb8b46610f45738f4a72c5a6 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 04:36:37 +0000 Subject: [PATCH 09/23] Make missing directory --- .github/workflows/laravel.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 3bb3d535b..a407c7993 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -39,4 +39,6 @@ jobs: env: DB_CONNECTION: mysql DB_DATABASE: TEST - run: vendor/bin/phpunit + run: | + mkdir -p /home/runner/work/newznab-tmux/newznab-tmux/./tests/Unit + vendor/bin/phpunit From 90047ca5ffab646de3bc8752d251fda9e00e58ef Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 06:29:21 +0000 Subject: [PATCH 10/23] Use correct .env for tests --- .env.travis => .env.test | 2 +- .github/workflows/laravel.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename .env.travis => .env.test (96%) diff --git a/.env.travis b/.env.test similarity index 96% rename from .env.travis rename to .env.test index 20e87228b..46460a1a5 100644 --- a/.env.travis +++ b/.env.test @@ -1,5 +1,5 @@ DB_CONNECTION=mysql -DB_HOST = localhost +DB_HOST = 127.0.0.1 DB_PORT = 3306 DB_SOCKET = DB_USERNAME = TEST diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index a407c7993..151a0a405 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Copy .env - run: php -r "file_exists('.env') || copy('.env.example', '.env');" + run: php -r "file_exists('.env') || copy('.env.test', '.env');" - name: Install Dependencies run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist - name: Generate key From 038638a12807f6f7b47093a2e1433633410e7bc8 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 06:32:48 +0000 Subject: [PATCH 11/23] Configure non root db user --- .github/workflows/laravel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 151a0a405..d8e7d7a63 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -16,6 +16,8 @@ jobs: env: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: TEST + MYSQL_USER: TEST + MYSQL_PASSWORD: TEST ports: - 3306:3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 From 02ef17f5baa897adb2a2e7d1501cf879aec12af3 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 06:37:18 +0000 Subject: [PATCH 12/23] Pre-create the build/logs directory --- .github/workflows/laravel.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index d8e7d7a63..1012c5ceb 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -42,5 +42,6 @@ jobs: DB_CONNECTION: mysql DB_DATABASE: TEST run: | - mkdir -p /home/runner/work/newznab-tmux/newznab-tmux/./tests/Unit + mkdir -p /home/runner/work/newznab-tmux/newznab-tmux/tests/Unit + mkdir -p /home/runner/work/newznab-tmux/newznab-tmux/build/logs vendor/bin/phpunit From 2e17734d4894908387f5ef5cbb77a820af646c94 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 06:41:19 +0000 Subject: [PATCH 13/23] Attempting to clean up directories --- .github/workflows/laravel.yml | 3 +-- phpunit.xml | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 1012c5ceb..514db9a8c 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -35,7 +35,6 @@ jobs: - name: Create Database run: | mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" - mysql -h 127.0.0.1 -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" if [[ -f /etc/mysql/my.cnf ]]; then sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; fi - name: Execute tests (Unit and Feature tests) via PHPUnit env: @@ -43,5 +42,5 @@ jobs: DB_DATABASE: TEST run: | mkdir -p /home/runner/work/newznab-tmux/newznab-tmux/tests/Unit - mkdir -p /home/runner/work/newznab-tmux/newznab-tmux/build/logs + mkdir -p /home/runner/work/newznab-tmux/newznab-tmux/tests/build/logs vendor/bin/phpunit diff --git a/phpunit.xml b/phpunit.xml index ec2527f01..d35a5dec7 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -10,22 +10,22 @@ stopOnFailure="false"> - ./tests/Install + tests/Install - ./tests/Unit + tests/Unit - ./tests/Feature + tests/Feature - ./Blacklight - ./app + Blacklight + app @@ -37,6 +37,6 @@ - + From 36c1a1f2bfcd43d9c9893253584a4c0962ed4e25 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Sat, 5 Dec 2020 06:50:12 +0000 Subject: [PATCH 14/23] Ensure telescope is not enabled --- .env.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.env.test b/.env.test index 46460a1a5..d7227b393 100644 --- a/.env.test +++ b/.env.test @@ -36,3 +36,5 @@ APP_ENV=local APP_DEBUG=true APP_URL= APP_KEY= + +TELESCOPE_ENABLED=false From 2dd7d609780151e92665b40d90b98826e76642c3 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Thu, 31 Dec 2020 14:21:55 -0600 Subject: [PATCH 15/23] Let composer be verbose and remove deprecated option --- .github/workflows/laravel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 514db9a8c..7ba55c0e4 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -27,7 +27,7 @@ jobs: - name: Copy .env run: php -r "file_exists('.env') || copy('.env.test', '.env');" - name: Install Dependencies - run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist + run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - name: Generate key run: php artisan key:generate - name: Directory Permissions From f19fcca611f39c74c7f21c07636a1eda0c1363d9 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Thu, 31 Dec 2020 14:36:56 -0600 Subject: [PATCH 16/23] Cleanup build file and add php setup --- .github/workflows/laravel.yml | 47 +++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index 7ba55c0e4..d5d59ac06 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -2,40 +2,55 @@ name: Laravel on: push: - branches: [ master, dev ] + branches: [master, dev] pull_request: - branches: [ master, dev ] + branches: [master, dev] jobs: laravel-tests: - runs-on: ubuntu-latest services: - mysql: - image: mariadb:10 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: TEST - MYSQL_USER: TEST - MYSQL_PASSWORD: TEST - ports: - - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + mysql: + image: mariadb:10 + env: + MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_DATABASE: TEST + MYSQL_USER: TEST + MYSQL_PASSWORD: TEST + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + extensions: gd, intl, memcached, sodium + composer: v2 + - uses: actions/checkout@v2 + - name: Copy .env - run: php -r "file_exists('.env') || copy('.env.test', '.env');" + run: cp .env.test .env + - name: Install Dependencies run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + - name: Generate key run: php artisan key:generate + - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache + - name: Create Database run: | - mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" - if [[ -f /etc/mysql/my.cnf ]]; then sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; fi + mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" + + if [[ -f /etc/mysql/my.cnf ]]; then + sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; + fi + - name: Execute tests (Unit and Feature tests) via PHPUnit env: DB_CONNECTION: mysql From 0b05f30491d5e76ac6aeb172aa39ee0cb7d3e246 Mon Sep 17 00:00:00 2001 From: Beshoy Girgis Date: Thu, 31 Dec 2020 14:44:27 -0600 Subject: [PATCH 17/23] Removing suspected unnecessary step --- .github/workflows/laravel.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index d5d59ac06..6e8a7ebbd 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -43,14 +43,6 @@ jobs: - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache - - name: Create Database - run: | - mysql -h 127.0.0.1 -u root -e "SET GLOBAL innodb_file_per_table = 1;" - - if [[ -f /etc/mysql/my.cnf ]]; then - sudo sed -i "s/\[mysqld\]/\[mysqld\]\ngroup_concat_max_len = 8192/" /etc/mysql/my.cnf; - fi - - name: Execute tests (Unit and Feature tests) via PHPUnit env: DB_CONNECTION: mysql From 4febab31347491e8b2dd6e9f9a58eb79a8ecfe91 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sat, 2 Jan 2021 17:10:35 +0100 Subject: [PATCH 18/23] Update used components to theri latest versions --- .env.travis | 40 +++++++++++++++++++ composer.lock | 94 ++++++++++++++++++++++---------------------- config/google2fa.php | 4 +- 3 files changed, 89 insertions(+), 49 deletions(-) create mode 100644 .env.travis diff --git a/.env.travis b/.env.travis new file mode 100644 index 000000000..d7227b393 --- /dev/null +++ b/.env.travis @@ -0,0 +1,40 @@ +DB_CONNECTION=mysql +DB_HOST = 127.0.0.1 +DB_PORT = 3306 +DB_SOCKET = +DB_USERNAME = TEST +DB_PASSWORD = TEST +DB_DATABASE = TEST + +NNTP_USERNAME = +NNTP_PASSWORD = +NNTP_SERVER = +NNTP_PORT = +NNTP_SSLENABLED = false +NNTP_SOCKET_TIMEOUT =120 + +NNTP_USERNAME_A = +NNTP_PASSWORD_A = +NNTP_SERVER_A = +NNTP_PORT_A = +NNTP_SSLENABLED_A = false +NNTP_SOCKET_TIMEOUT_A = 120 + + +NN_SSL_CAFILE = +NN_SSL_CAPATH = +NN_SSL_VERIFY_PEER = +NN_SSL_VERIFY_HOST = +NN_SSL_ALLOW_SELF_SIGNED = 1 + +ADMIN_USER = TEST +ADMIN_PASS = TEST +ADMIN_EMAIL = test@example.com + +APP_NAME=NNTmux +APP_ENV=local +APP_DEBUG=true +APP_URL= +APP_KEY= + +TELESCOPE_ENABLED=false diff --git a/composer.lock b/composer.lock index 65d35b1f2..4ccf7fc72 100644 --- a/composer.lock +++ b/composer.lock @@ -787,16 +787,16 @@ }, { "name": "cviebrock/laravel-elasticsearch", - "version": "8.0.2", + "version": "8.0.3", "source": { "type": "git", "url": "https://github.com/cviebrock/laravel-elasticsearch.git", - "reference": "de899cad8293de822d808ebf287cb924aeffaa2e" + "reference": "32ad18b0ad2315b3f0c3438a2c455e6cf383738a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cviebrock/laravel-elasticsearch/zipball/de899cad8293de822d808ebf287cb924aeffaa2e", - "reference": "de899cad8293de822d808ebf287cb924aeffaa2e", + "url": "https://api.github.com/repos/cviebrock/laravel-elasticsearch/zipball/32ad18b0ad2315b3f0c3438a2c455e6cf383738a", + "reference": "32ad18b0ad2315b3f0c3438a2c455e6cf383738a", "shasum": "" }, "require": { @@ -850,7 +850,7 @@ "laravel", "search" ], - "time": "2020-12-02T18:43:28+00:00" + "time": "2020-12-28T18:49:27+00:00" }, { "name": "czproject/git-php", @@ -1945,16 +1945,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.24", + "version": "2.1.25", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ca90a3291eee1538cd48ff25163240695bd95448" + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ca90a3291eee1538cd48ff25163240695bd95448", - "reference": "ca90a3291eee1538cd48ff25163240695bd95448", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", "shasum": "" }, "require": { @@ -2005,7 +2005,7 @@ "type": "github" } ], - "time": "2020-11-14T15:56:27+00:00" + "time": "2020-12-29T14:50:06+00:00" }, { "name": "elasticsearch/elasticsearch", @@ -3637,16 +3637,16 @@ }, { "name": "laravel/scout", - "version": "v8.5.1", + "version": "v8.5.2", "source": { "type": "git", "url": "https://github.com/laravel/scout.git", - "reference": "b8b8a35cc3ac82cbc07dfa83955492d2ef6e237b" + "reference": "ece6758b82c51ff7f5e011f243a7c6b33711a847" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/scout/zipball/b8b8a35cc3ac82cbc07dfa83955492d2ef6e237b", - "reference": "b8b8a35cc3ac82cbc07dfa83955492d2ef6e237b", + "url": "https://api.github.com/repos/laravel/scout/zipball/ece6758b82c51ff7f5e011f243a7c6b33711a847", + "reference": "ece6758b82c51ff7f5e011f243a7c6b33711a847", "shasum": "" }, "require": { @@ -3698,7 +3698,7 @@ "laravel", "search" ], - "time": "2020-12-22T17:29:20+00:00" + "time": "2020-12-30T15:52:14+00:00" }, { "name": "laravel/telescope", @@ -6178,16 +6178,16 @@ }, { "name": "propaganistas/laravel-disposable-email", - "version": "2.0.13", + "version": "2.0.14", "source": { "type": "git", "url": "https://github.com/Propaganistas/Laravel-Disposable-Email.git", - "reference": "568887f20f6325f289b3a685a4fc51d536d8ce44" + "reference": "2c6f05e5731421e158c24a950c5d497bc5145e78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Propaganistas/Laravel-Disposable-Email/zipball/568887f20f6325f289b3a685a4fc51d536d8ce44", - "reference": "568887f20f6325f289b3a685a4fc51d536d8ce44", + "url": "https://api.github.com/repos/Propaganistas/Laravel-Disposable-Email/zipball/2c6f05e5731421e158c24a950c5d497bc5145e78", + "reference": "2c6f05e5731421e158c24a950c5d497bc5145e78", "shasum": "" }, "require": { @@ -6197,7 +6197,7 @@ "illuminate/contracts": "^6.0|^7.0|^8.0", "illuminate/support": "^6.0|^7.0|^8.0", "illuminate/validation": "^6.0|^7.0|^8.0", - "php": ">=7.1|^8.0" + "php": "^7.1|^8.0" }, "require-dev": { "mockery/mockery": "^1.3.3|^1.4.2", @@ -6238,7 +6238,7 @@ "throwaway", "validator" ], - "time": "2020-12-01T08:38:01+00:00" + "time": "2020-12-29T08:37:28+00:00" }, { "name": "psr/cache", @@ -7064,16 +7064,16 @@ }, { "name": "spatie/async", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/spatie/async.git", - "reference": "e410c38a93b93589dfd8046b4b93cdaa6a9b7de2" + "reference": "d371b76ff876530c4906596490fd977720477e48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/async/zipball/e410c38a93b93589dfd8046b4b93cdaa6a9b7de2", - "reference": "e410c38a93b93589dfd8046b4b93cdaa6a9b7de2", + "url": "https://api.github.com/repos/spatie/async/zipball/d371b76ff876530c4906596490fd977720477e48", + "reference": "d371b76ff876530c4906596490fd977720477e48", "shasum": "" }, "require": { @@ -7123,7 +7123,7 @@ "type": "github" } ], - "time": "2020-11-20T06:05:35+00:00" + "time": "2020-12-29T22:19:12+00:00" }, { "name": "spatie/db-dumper", @@ -10872,44 +10872,44 @@ "packages-dev": [ { "name": "barryvdh/laravel-ide-helper", - "version": "v2.8.2", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "5515cabea39b9cf55f98980d0f269dc9d85cfcca" + "reference": "64a6b902583802c162cdccf7e76dc8619368bf1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/5515cabea39b9cf55f98980d0f269dc9d85cfcca", - "reference": "5515cabea39b9cf55f98980d0f269dc9d85cfcca", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/64a6b902583802c162cdccf7e76dc8619368bf1a", + "reference": "64a6b902583802c162cdccf7e76dc8619368bf1a", "shasum": "" }, "require": { "barryvdh/reflection-docblock": "^2.0.6", "composer/composer": "^1.6 || ^2", - "doctrine/dbal": "~2.3", + "doctrine/dbal": "^2.6 || ^3", "ext-json": "*", - "illuminate/console": "^6 || ^7 || ^8", - "illuminate/filesystem": "^6 || ^7 || ^8", - "illuminate/support": "^6 || ^7 || ^8", - "php": ">=7.2", + "illuminate/console": "^8", + "illuminate/filesystem": "^8", + "illuminate/support": "^8", + "php": "^7.3 || ^8.0", "phpdocumentor/type-resolver": "^1.1.0" }, "require-dev": { "ext-pdo_sqlite": "*", "friendsofphp/php-cs-fixer": "^2", - "illuminate/config": "^6 || ^7 || ^8", - "illuminate/view": "^6 || ^7 || ^8", - "mockery/mockery": "^1.3.3", - "orchestra/testbench": "^4 || ^5 || ^6", + "illuminate/config": "^8", + "illuminate/view": "^8", + "mockery/mockery": "^1.4", + "orchestra/testbench": "^6", "phpunit/phpunit": "^8.5 || ^9", - "spatie/phpunit-snapshot-assertions": "^1.4 || ^2.2 || ^3 || ^4", + "spatie/phpunit-snapshot-assertions": "^3 || ^4", "vimeo/psalm": "^3.12" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "2.9-dev" }, "laravel": { "providers": [ @@ -10950,7 +10950,7 @@ "type": "github" } ], - "time": "2020-12-06T08:55:05+00:00" + "time": "2020-12-29T10:11:05+00:00" }, { "name": "barryvdh/reflection-docblock", @@ -11690,16 +11690,16 @@ }, { "name": "facade/ignition", - "version": "2.5.3", + "version": "2.5.8", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "d8dc4f90ed469f9f9313b976fb078c20585d5c99" + "reference": "8e907d81244649c5ea746e2ec30c32c5f59df472" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/d8dc4f90ed469f9f9313b976fb078c20585d5c99", - "reference": "d8dc4f90ed469f9f9313b976fb078c20585d5c99", + "url": "https://api.github.com/repos/facade/ignition/zipball/8e907d81244649c5ea746e2ec30c32c5f59df472", + "reference": "8e907d81244649c5ea746e2ec30c32c5f59df472", "shasum": "" }, "require": { @@ -11757,7 +11757,7 @@ "laravel", "page" ], - "time": "2020-12-09T20:25:45+00:00" + "time": "2020-12-29T09:12:55+00:00" }, { "name": "facade/ignition-contracts", diff --git a/config/google2fa.php b/config/google2fa.php index d6191c1fa..3ca58bfa8 100644 --- a/config/google2fa.php +++ b/config/google2fa.php @@ -5,7 +5,7 @@ return [ /* * Enable / disable Google2FA. */ - 'enabled' => env('OTP_ENABLED', true), + 'enabled' => env('OTP_ENABLED', false), /* * Lifetime in minutes. @@ -48,7 +48,7 @@ return [ /* * Forbid user to reuse One Time Passwords. */ - 'forbid_old_passwords' => true, + 'forbid_old_passwords' => false, /* * User's table column for google2fa secret. From 30ea237b994e51c75b449b6efbb503103607fa09 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sat, 2 Jan 2021 17:53:21 +0100 Subject: [PATCH 19/23] Update composer.json and travis config --- .travis.yml | 7 ++----- composer.json | 6 ------ composer.lock | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c6283805..75a1ef783 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php sudo: required -dist: xenial -group: edge +dist: bionic branches: only: @@ -20,11 +19,10 @@ notifications: - "\x030[\x0310Travis-ci\x030]\x03 Commit \x0314{%{commit}}\x03 by \x0315(%{author})\x03@\x0313%{repository_name}/%{branch}\x03 has \x037%{result}\x03: \x032%{build_url}\x03" php: - - '7.3' - '7.4' addons: - mariadb: '10.2' + mariadb: '10.4' apt: packages: - curl @@ -41,7 +39,6 @@ install: # Configure environment settings - cp .env.travis .env # Install composer packages. - - composer global require hirak/prestissimo - composer install --prefer-dist before_script: diff --git a/composer.json b/composer.json index cc07e32e6..e25e7ca1f 100755 --- a/composer.json +++ b/composer.json @@ -31,12 +31,6 @@ "optimize-autoloader": true }, "description": "A Usenet Indexer", - "extra": { - "branch-alias": { - "dev-dev": "1.x-dev" - } - - }, "keywords": [ "NNTmux", "newznab-tmux", diff --git a/composer.lock b/composer.lock index 4ccf7fc72..be1dab6bf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f507d2a8906f891af68933e1d18c169f", + "content-hash": "5f9478c3a5991536417508a5606f9ac1", "packages": [ { "name": "aharen/omdbapi", From ba195642794cd4cdefb04447a62efb542f556eda Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sat, 2 Jan 2021 18:06:20 +0100 Subject: [PATCH 20/23] Update .travis.yml --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 75a1ef783..651817647 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,9 +30,6 @@ addons: before_install: - sudo add-apt-repository ppa:ondrej/php -y - sudo apt-get -qq update - - sudo apt-get install -y libsodium-dev - - pecl install libsodium - - mysql_upgrade -u root - composer validate install: From 3c8266a350b1dfdd69af15e91282d0ab8fc6fc97 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sat, 2 Jan 2021 18:54:11 +0100 Subject: [PATCH 21/23] Update travis config once more --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 651817647..647a7ee55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,9 +40,6 @@ install: before_script: # Create mysql database and user. - - mysql -u root -e "SET GLOBAL innodb_file_per_table = 1;" - - mysql -u root -e "SET GLOBAL innodb_file_format = BARRACUDA;" - - mysql -u root -e "SET GLOBAL innodb_large_prefix = 1;" - mysql -u root -e "CREATE DATABASE TEST;" - mysql -u root -e "GRANT ALL ON TEST.* TO 'TEST'@'localhost' IDENTIFIED BY 'TEST';" # Disable apparmor. From b748fe7c099b8cb2bdf642793f252a1213d68254 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sat, 2 Jan 2021 20:00:41 +0100 Subject: [PATCH 22/23] Update XXX categorization --- Blacklight/Categorize.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Blacklight/Categorize.php b/Blacklight/Categorize.php index 06787ae08..002670c46 100755 --- a/Blacklight/Categorize.php +++ b/Blacklight/Categorize.php @@ -711,7 +711,7 @@ class Categorize */ public function isXxxUHD(): bool { - if (preg_match('/XXX.+(2160p)+[\w\-.]+(M[PO][V4]-(KTR|GUSH|FaiLED|SEXORS|hUSHhUSH|YAPG))/i', $this->releaseName)) { + if (preg_match('/XXX.+(2160p)+[\w\-.]+(M[PO][V4]-(KTR|GUSH|FaiLED|SEXORS|hUSHhUSH|YAPG|WRB|NBQ|FETiSH))/i', $this->releaseName)) { $this->tmpCat = Category::XXX_UHD; $this->tmpTag[] = Category::TAG_XXX_UHD; @@ -726,7 +726,7 @@ class Categorize */ public function isXxxClipHD(): bool { - if (preg_match('/^[\w\-.]+(\d{2}\.\d{2}\.\d{2}).+(720|1080)+[\w\-.]+(M[PO][V4]-(KTR|GUSH|FaiLED|SEXORS|hUSHhUSH|YAPG|TRASHBIN))/i', $this->releaseName)) { + if (preg_match('/^[\w\-.]+(\d{2}\.\d{2}\.\d{2}).+(720|1080)+[\w\-.]+(M[PO][V4]-(KTR|GUSH|FaiLED|SEXORS|hUSHhUSH|YAPG|TRASHBIN|WRB|NBQ|FETiSH))/i', $this->releaseName)) { $this->tmpCat = Category::XXX_CLIPHD; $this->tmpTag[] = Category::TAG_XXX_CLIPHD; From e7eead30d8101d1c8b1bb93c6eb2751333eca408 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sat, 2 Jan 2021 20:38:08 +0100 Subject: [PATCH 23/23] Update doctrine/dbal to version 3.0 --- composer.json | 2 +- composer.lock | 89 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 80 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index e25e7ca1f..18582eed2 100755 --- a/composer.json +++ b/composer.json @@ -94,7 +94,7 @@ "dariusiii/token": "^3.0", "dariusiii/zipper": "^2.0", "dborsatto/php-giantbomb": "^2.0", - "doctrine/dbal": "^2.7", + "doctrine/dbal": "^3.0", "fakerphp/faker": "^1.12", "fideloper/proxy": "^4.2", "foolz/sphinxql-query-builder": "^2.0", diff --git a/composer.lock b/composer.lock index be1dab6bf..9461b4ad8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5f9478c3a5991536417508a5606f9ac1", + "content-hash": "6d5062cae91af70c99e6d07e39642b2c", "packages": [ { "name": "aharen/omdbapi", @@ -785,6 +785,75 @@ ], "time": "2020-08-23T12:54:47+00:00" }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.1", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "reference": "7413f0b55a051e89485c5cb9f765fe24bb02a7b6", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-11T10:22:58+00:00" + }, { "name": "cviebrock/laravel-elasticsearch", "version": "8.0.3", @@ -1524,28 +1593,29 @@ }, { "name": "doctrine/dbal", - "version": "2.12.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "adce7a954a1c2f14f85e94aed90c8489af204086" + "reference": "ee6d1260d5cc20ec506455a585945d7bdb98662c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/adce7a954a1c2f14f85e94aed90c8489af204086", - "reference": "adce7a954a1c2f14f85e94aed90c8489af204086", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/ee6d1260d5cc20ec506455a585945d7bdb98662c", + "reference": "ee6d1260d5cc20ec506455a585945d7bdb98662c", "shasum": "" }, "require": { + "composer/package-versions-deprecated": "^1.11.99", "doctrine/cache": "^1.0", "doctrine/event-manager": "^1.0", - "ext-pdo": "*", - "php": "^7.3 || ^8" + "php": "^7.3 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^8.1", "jetbrains/phpstorm-stubs": "^2019.1", "phpstan/phpstan": "^0.12.40", + "phpstan/phpstan-strict-rules": "^0.12.2", "phpunit/phpunit": "^9.4", "psalm/plugin-phpunit": "^0.10.0", "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", @@ -1565,7 +1635,7 @@ }, "autoload": { "psr-4": { - "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" + "Doctrine\\DBAL\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1608,7 +1678,6 @@ "queryobject", "sasql", "sql", - "sqlanywhere", "sqlite", "sqlserver", "sqlsrv" @@ -1627,7 +1696,7 @@ "type": "tidelift" } ], - "time": "2020-11-14T20:26:58+00:00" + "time": "2020-11-15T18:20:41+00:00" }, { "name": "doctrine/event-manager",