diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..09dc460 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,45 @@ +on: push +name: Tests +jobs: + node: + strategy: + matrix: + node: ["12", "14", "16", "18", "20"] + name: Node.js + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v2 + with: + node-version: ${{matrix.node}} + - run: npm install + - run: npm test + php: + strategy: + matrix: + # https://www.php.net/supported-versions.php + php: ["8.0", "8.1", "8.2"] + name: PHP + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{matrix.php}} + tools: phpunit, composer + - run: composer install --no-interaction + - run: ./vendor/bin/phpunit --migrate-configuration + ruby: + strategy: + matrix: + ruby: ["2.6", "2.7", "3.0", "3.1"] + name: Ruby + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle install + - run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3eb62af..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -jobs: - include: - - language: php - php: '7.2' - install: composer install - - language: php - php: '7.3' - install: composer install - - language: php - php: '7.4' - install: composer install - - language: node_js - node_js: '10' - - language: node_js - node_js: '12' - - language: node_js - node_js: '13' - - language: python - python: '3.5' - script: nosetests tests/test.py - - language: python - python: '3.6' - script: nosetests tests/test.py - - language: python - python: '3.7' - script: nosetests tests/test.py - - language: python - python: '3.8' - script: nosetests tests/test.py - - language: ruby - ruby: '2.5' - - language: ruby - ruby: '2.6' - - language: ruby - ruby: '2.7' diff --git a/composer.json b/composer.json index 341a03f..62aebad 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "/pincode-validator.gemspec", "/bin", - "/src/pincode_validator.rb", + "/src/pincode_validator.rb" ] }, "require": {},