Skip to content

Commit 7a3d1c9

Browse files
committed
working on a new workflow
1 parent 1772d66 commit 7a3d1c9

File tree

2 files changed

+60
-31
lines changed

2 files changed

+60
-31
lines changed

.github/workflows/main.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Testing Suite
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
DATA_API_MYSQL_HOST: '127.0.0.1'
7+
DATA_API_REDIS_HOST: '127.0.0.1'
8+
9+
jobs:
10+
run:
11+
runs-on: ubuntu-latest
12+
name: PHPCS - PHP-${{ matrix.php }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php: ['8.0', '8.1' ]
17+
services:
18+
mysql:
19+
image: mysql:5.7
20+
env:
21+
MYSQL_ROOT_PASSWORD: secret
22+
redis:
23+
image: redis:5-alpine
24+
steps:
25+
- uses: actions/checkout@v1
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
tools: pecl
31+
extensions: mbstring, intl, json, phalcon-5.0.0RC4
32+
coverage: xdebug
33+
34+
- name: Init Database
35+
run: |
36+
mysql -uroot -h127.0.0.1 -proot -e 'CREATE DATABASE IF NOT EXISTS `phalcon_api`;'
37+
38+
- name: Validate composer.json and composer.lock
39+
run: composer validate
40+
41+
- name: Install Composer dependencies
42+
run: composer install --prefer-dist --no-progress --no-suggest
43+
44+
- name: Run PHPCS
45+
if: always()
46+
run: vendor/bin/phpcs
47+
48+
- name: Run migrations
49+
if: always()
50+
run: |
51+
vendor/bin/phinx migrate
52+
53+
- name: Run tests
54+
if: always()
55+
run: |
56+
vendor/bin/codecept build
57+
vendor/bin/codecept run unit --coverage-xml=unit-coverage.xml
58+
vendor/bin/codecept run integration --coverage-xml=integration-coverage.xml
59+
vendor/bin/codecept run cli --coverage-xml=cli-coverage.xml
60+
vendor/bin/codecept run api --coverage-xml=api-coverage.xml

.github/workflows/phpcs.yml

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

0 commit comments

Comments
 (0)