Skip to content

Commit 9b92fa0

Browse files
authored
Merge pull request #65 from Codeception/github-actions
Use Github Actions
2 parents 88e1c13 + a0197e0 commit 9b92fa0

File tree

2 files changed

+111
-35
lines changed

2 files changed

+111
-35
lines changed

.github/workflows/main.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
codeception3:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4]
12+
13+
env:
14+
extensions: zip
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php }}
24+
25+
- name: Use Composer v1
26+
run: composer self-update --1
27+
28+
- name: Validate composer.json
29+
run: composer validate
30+
31+
- name: Install dependencies
32+
run: |
33+
composer require codeception/codeception:"^3.0" --dev --prefer-source
34+
cp c3.php vendor/codeception/codeception/tests/data/claypit
35+
36+
- name: Start PHP Server
37+
run: |
38+
cd vendor/codeception/codeception && php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
39+
40+
- name: Run test suite
41+
run: cd vendor/codeception/codeception && php ./codecept run coverage
42+
43+
composer1:
44+
runs-on: ubuntu-latest
45+
46+
strategy:
47+
matrix:
48+
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
49+
50+
steps:
51+
- name: Checkout code
52+
uses: actions/checkout@v2
53+
54+
- name: Setup PHP
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: ${{ matrix.php }}
58+
59+
- name: Use Composer v1
60+
run: composer self-update --1
61+
62+
- name: Validate composer.json
63+
run: composer validate
64+
65+
- name: Install dependencies
66+
run: |
67+
composer require codeception/codeception:"^4.1" --dev --prefer-source
68+
composer require codeception/module-filesystem codeception/module-cli codeception/module-asserts codeception/module-phpbrowser --dev
69+
cp c3.php vendor/codeception/codeception/tests/data/claypit
70+
71+
- name: Start PHP Server
72+
run: |
73+
cd vendor/codeception/codeception && php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
74+
75+
- name: Run test suite
76+
run: cd vendor/codeception/codeception && php ./codecept run coverage
77+
78+
composer2:
79+
runs-on: ubuntu-latest
80+
81+
strategy:
82+
matrix:
83+
php: [7.2, 7.3, 7.4, 8.0]
84+
85+
steps:
86+
- name: Checkout code
87+
uses: actions/checkout@v2
88+
89+
- name: Setup PHP
90+
uses: shivammathur/setup-php@v2
91+
with:
92+
php-version: ${{ matrix.php }}
93+
94+
- name: Use Composer v2
95+
run: composer self-update --2
96+
97+
- name: Validate composer.json
98+
run: composer validate
99+
100+
- name: Install dependencies
101+
run: |
102+
composer require codeception/codeception:"^4.1" --dev --prefer-source
103+
composer require codeception/module-filesystem codeception/module-cli codeception/module-asserts codeception/module-phpbrowser --dev
104+
cp c3.php vendor/codeception/codeception/tests/data/claypit
105+
106+
- name: Start PHP Server
107+
run: |
108+
cd vendor/codeception/codeception && php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
109+
110+
- name: Run test suite
111+
run: cd vendor/codeception/codeception && php ./codecept run coverage

.travis.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)