mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-03-22 13:10:41 +08:00
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: Tests
|
|
on: [push]
|
|
|
|
jobs:
|
|
Composer:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Validate composer.json and composer.lock
|
|
run: composer validate
|
|
- name: Install dependencies
|
|
run: composer install --prefer-dist --no-suggest
|
|
- name: Install Google Cloud Storage
|
|
run: composer require google/cloud-storage
|
|
PHPunit:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
|
|
name: PHP ${{ matrix.php-versions }} unit tests on ${{ matrix.operating-system }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
extensions: gd, sqlite3
|
|
- name: Remove composer lock
|
|
run: rm composer.lock
|
|
- name: Setup PHPunit
|
|
run: composer install -n
|
|
- name: Install Google Cloud Storage
|
|
run: composer require google/cloud-storage
|
|
- name: Run unit tests
|
|
run: ../vendor/bin/phpunit --no-coverage
|
|
working-directory: tst
|
|
Mocha:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12'
|
|
- name: Setup Mocha
|
|
run: npm install -g mocha
|
|
- name: Setup Node modules
|
|
run: npm install
|
|
working-directory: js
|
|
- name: Run unit tests
|
|
run: mocha
|
|
working-directory: js
|
|
|