mirror of
https://github.com/vlucas/valitron.git
synced 2025-12-30 23:01:52 +00:00
Added GitHub workflow file, removed Travis CI file. Changed how email DNS validation works to only check MX record.
This commit is contained in:
parent
f7e662e3c0
commit
5deb47049a
73
.github/workflows/test.yml
vendored
Normal file
73
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
name: Run Tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.operating-system }}
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: ['ubuntu-latest']
|
||||
php-versions:
|
||||
- '5.4'
|
||||
- '5.5'
|
||||
- '5.6'
|
||||
- '7.0'
|
||||
- '7.1'
|
||||
- '7.2'
|
||||
- '7.3'
|
||||
- '7.4'
|
||||
# - '8.0'
|
||||
# - '8.1'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
- name: Cache composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-${{ matrix.php-versions }}-
|
||||
- name: Validate composer configuration
|
||||
run: |
|
||||
composer validate
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
composer install --no-progress
|
||||
- name: Run tests
|
||||
run: |
|
||||
composer run-script test
|
||||
|
||||
# test-hhvm:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v2
|
||||
# - name: Setup HHVM
|
||||
# uses: azjezz/setup-hhvm@v1
|
||||
# with:
|
||||
# version: latest
|
||||
# debug: false
|
||||
# - name: Cache composer packages
|
||||
# id: composer-cache
|
||||
# uses: actions/cache@v2
|
||||
# with:
|
||||
# path: vendor
|
||||
# key: ${{ runner.os }}-hhvm-${{ hashFiles('**/composer.lock') }}
|
||||
# restore-keys: |
|
||||
# ${{ runner.os }}-hhvm-
|
||||
# - name: Validate composer configuration
|
||||
# run: |
|
||||
# composer validate
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# composer install --no-progress
|
||||
# - name: Run tests
|
||||
# run: |
|
||||
# composer run-script test
|
||||
32
.travis.yml
32
.travis.yml
@ -1,32 +0,0 @@
|
||||
#see https://travis-ci.community/t/php-5-4-and-5-5-archives-missing/3723
|
||||
dist: trusty
|
||||
|
||||
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
|
||||
language: php
|
||||
|
||||
# list any PHP version you want to test against
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
- 7.4
|
||||
- nightly
|
||||
- hhvm
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
- php: nightly
|
||||
include:
|
||||
- php: 5.3
|
||||
dist: precise
|
||||
|
||||
before_script:
|
||||
- composer install
|
||||
|
||||
# Script to run tests
|
||||
script: composer test
|
||||
@ -3,20 +3,20 @@
|
||||
"type": "library",
|
||||
"description": "Simple, elegant, stand-alone validation library with NO dependencies",
|
||||
"keywords": ["validation", "validator", "valid"],
|
||||
"homepage": "http://github.com/vlucas/valitron",
|
||||
"homepage": "https://github.com/vlucas/valitron",
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Vance Lucas",
|
||||
"email": "vance@vancelucas.com",
|
||||
"homepage": "http://www.vancelucas.com"
|
||||
"homepage": "https://www.vancelucas.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35 || ^5.5 || ^6.5"
|
||||
"phpunit/phpunit": ">=4.8.35 <8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "It can support the multiple bytes string length."
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
>
|
||||
<testsuites>
|
||||
@ -15,12 +14,4 @@
|
||||
<directory suffix="Test.php">tests/Valitron</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">src/</directory>
|
||||
</whitelist>
|
||||
<blacklist>
|
||||
<directory suffix=".php">vendor/</directory>
|
||||
</blacklist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
|
||||
@ -627,7 +627,8 @@ class Validator
|
||||
if (function_exists('idn_to_ascii') && defined('INTL_IDNA_VARIANT_UTS46')) {
|
||||
$domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46);
|
||||
}
|
||||
return checkdnsrr($domain, 'ANY');
|
||||
|
||||
return checkdnsrr($domain, 'MX');
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user