Skip to content

Commit ed4f71e

Browse files
Merge pull request #482 from paragonie/ga
Migrate from Travis CI to Github Actions
2 parents ed46493 + a84eee5 commit ed4f71e

File tree

2 files changed

+108
-1
lines changed

2 files changed

+108
-1
lines changed

.github/workflows/ci.yml

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
old:
7+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
8+
runs-on: ${{ matrix.operating-system }}
9+
strategy:
10+
matrix:
11+
operating-system: ['ubuntu-16.04']
12+
php-versions: ['5.4', '5.5', '5.6', '7.0']
13+
phpunit-versions: ['7.5.20']
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
extensions: mbstring, intl
23+
ini-values: post_max_size=256M, max_execution_time=180
24+
tools: psalm, phpunit:${{ matrix.phpunit-versions }}
25+
26+
- name: Fix permissions
27+
run: sudo chmod -R 0777 .
28+
29+
- name: Install dependencies
30+
run: composer self-update --1; composer install
31+
32+
- name: PHPUnit tests
33+
uses: php-actions/phpunit@v2
34+
with:
35+
memory_limit: 256M
36+
37+
moderate:
38+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
39+
runs-on: ${{ matrix.operating-system }}
40+
strategy:
41+
matrix:
42+
operating-system: ['ubuntu-latest']
43+
php-versions: ['7.1', '7.2', '7.3']
44+
phpunit-versions: ['latest']
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v2
48+
49+
- name: Setup PHP
50+
uses: shivammathur/setup-php@v2
51+
with:
52+
php-version: ${{ matrix.php-versions }}
53+
extensions: mbstring, intl, sodium
54+
ini-values: post_max_size=256M, max_execution_time=180
55+
tools: psalm, phpunit:${{ matrix.phpunit-versions }}
56+
57+
- name: Fix permissions
58+
run: sudo chmod -R 0777 .
59+
60+
- name: Install dependencies
61+
run: composer install
62+
63+
- name: PHPUnit tests
64+
uses: php-actions/phpunit@v2
65+
timeout-minutes: 30
66+
with:
67+
memory_limit: 256M
68+
69+
modern:
70+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
71+
runs-on: ${{ matrix.operating-system }}
72+
strategy:
73+
matrix:
74+
operating-system: ['ubuntu-latest']
75+
php-versions: ['7.4', '8.0']
76+
phpunit-versions: ['latest']
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v2
80+
81+
- name: Setup PHP
82+
uses: shivammathur/setup-php@v2
83+
with:
84+
php-version: ${{ matrix.php-versions }}
85+
extensions: mbstring, intl, sodium
86+
ini-values: post_max_size=256M, max_execution_time=180
87+
tools: psalm, phpunit:${{ matrix.phpunit-versions }}
88+
89+
- name: Fix permissions
90+
run: sudo chmod -R 0777 .
91+
92+
- name: Install dependencies
93+
run: composer install
94+
95+
- name: PHPUnit tests
96+
uses: php-actions/phpunit@v2
97+
timeout-minutes: 30
98+
with:
99+
memory_limit: 256M
100+
101+
- name: Install Psalm
102+
if: contains(['7.4', '8.0'], ${{ matrix.php-version }})
103+
run: composer require --dev vimeo/psalm:^4
104+
105+
- name: Static Analysis
106+
if: contains(['7.4', '8.0], ${{ matrix.php-version }})
107+
run: vendor/bin/psalm

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
php-encryption
22
===============
33

4-
[![Build Status](https://travis-ci.org/defuse/php-encryption.svg?branch=master)](https://travis-ci.org/defuse/php-encryption)
4+
![Build Status](https://github.com/defuse/php-encryption/actions/workflows/ci.yml/badge.svg)
55
[![codecov](https://codecov.io/gh/defuse/php-encryption/branch/master/graph/badge.svg)](https://codecov.io/gh/defuse/php-encryption)
66
[![Latest Stable Version](https://poser.pugx.org/defuse/php-encryption/v/stable)](https://packagist.org/packages/defuse/php-encryption)
77
[![License](https://poser.pugx.org/defuse/php-encryption/license)](https://packagist.org/packages/defuse/php-encryption)

0 commit comments

Comments
 (0)