[ci] Migrate from Travis

This commit is contained in:
Nemo 2023-07-02 14:30:45 +05:30
parent e1cb3c9054
commit f1eb4a8c80
3 changed files with 46 additions and 36 deletions

45
.github/workflows/tests.yml vendored Normal file
View File

@ -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

View File

@ -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'

View File

@ -31,7 +31,7 @@
"/pincode-validator.gemspec",
"/bin",
"/src/pincode_validator.rb",
"/src/pincode_validator.rb"
]
},
"require": {},