Skip to content

Commit

Permalink
Use GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Sep 19, 2022
1 parent 3d3e619 commit b997045
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 35 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on: [push]

jobs:
moderate:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.2', '7.3']
phpunit-versions: ['latest']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, sodium
ini-values: post_max_size=256M, max_execution_time=180
tools: psalm, phpunit:${{ matrix.phpunit-versions }}

- name: Install dependencies
run: composer self-update --2.2 && composer install

- name: PHPUnit tests
uses: php-actions/phpunit@v2
timeout-minutes: 30
with:
memory_limit: 256M

modern:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4', '8.0', '8.1']
phpunit-versions: ['latest']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, sodium
ini-values: post_max_size=256M, max_execution_time=180
tools: psalm, phpunit:${{ matrix.phpunit-versions }}

- name: Install dependencies
run: composer install

- name: PHPUnit tests
uses: php-actions/phpunit@v2
timeout-minutes: 30
with:
memory_limit: 256M
35 changes: 35 additions & 0 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Psalm

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
psalm:
name: Psalm on PHP ${{ matrix.php-versions }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.1']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: psalm:4
coverage: none

- name: Install Composer dependencies
uses: "ramsey/composer-install@v1"

- name: Static Analysis
run: psalm

- name: Taint Analysis
run: psalm --taint-analysis
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EasyDB (Caching)

[![Build Status](https://travis-ci.org/paragonie/easydb-cache.svg?branch=master)](https://travis-ci.org/paragonie/easydb-cache)
[![Build Status](https://github.com/paragonie/easydb-cache/actions/workflows/ci.yml/badge.svg)](https://github.com/paragonie/easydb-cache/actions)
[![Latest Stable Version](https://poser.pugx.org/paragonie/easydb-cache/v/stable)](https://packagist.org/packages/paragonie/easydb-cache)
[![Latest Unstable Version](https://poser.pugx.org/paragonie/easydb-cache/v/unstable)](https://packagist.org/packages/paragonie/easydb-cache)
[![License](https://poser.pugx.org/paragonie/easydb-cache/license)](https://packagist.org/packages/paragonie/easydb-cache)
Expand Down
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<psalm
name="EasyDB static analysis tests."
useDocblockTypes="true"
totallyTyped="true"
>
<projectFiles>
<directory name="src" />
Expand Down

0 comments on commit b997045

Please sign in to comment.