Skip to content

Commit 10da1fb

Browse files
MCLOUD-5763: [Spike] Add GitHub workflow support (magento#721)
1 parent 15467de commit 10da1fb

File tree

4 files changed

+40
-52
lines changed

4 files changed

+40
-52
lines changed

.github/workflows/ci.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
on: [pull_request]
3+
4+
jobs:
5+
static-unit:
6+
name: Acceptance Tests
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php-versions: ['7.1', '7.2', '7.3']
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
REPO_USERNAME_CE: ${{ secrets.REPO_USERNAME_CE }}
14+
REPO_PASSWORD_CE: ${{ secrets.REPO_PASSWORD_CE }}
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v1
18+
with:
19+
fetch-depth: 1
20+
- name: Prepare PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-versions }}
24+
extensions: sockets
25+
- name: Composer credentials
26+
run: |
27+
composer config http-basic.repo.magento.com ${REPO_USERNAME_CE} ${REPO_PASSWORD_CE}
28+
composer config github-oauth.github.com ${GITHUB_TOKEN}
29+
- name: Composer Update
30+
run: composer update
31+
- name: Static and Unit tests
32+
run: |
33+
./vendor/bin/phpstan analyse -c ./tests/static/phpstan.neon
34+
./vendor/bin/phpcs ./src --standard=./tests/static/phpcs-ruleset.xml -p -n
35+
./vendor/bin/phpmd ./src xml ./tests/static/phpmd-ruleset.xml
36+
./vendor/bin/phpunit --configuration ./tests/unit --coverage-clover ./tests/unit/tmp/clover.xml && php ./tests/unit/code-coverage.php ./tests/unit/tmp/clover.xml
37+
./vendor/bin/phpunit --configuration ./tests/unit
38+
- name: Integration tests
39+
run: ./vendor/bin/phpunit --configuration ./tests/integration
40+

.travis.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,9 @@ env:
2626
- TEST_SUITE=functional-ee FUNCTIONAL_INDEX=5
2727

2828
stages:
29-
- static-unit
30-
- integration
3129
- test
3230

3331
jobs:
34-
include:
35-
- stage: static-unit
36-
script: ./tests/travis/static-unit.sh
37-
env:
38-
- TEST_SUITE=static-unit
39-
- XDEBUG=true
40-
- script: ./tests/travis/static-unit.sh
41-
php: '7.2'
42-
env:
43-
- TEST_SUITE=static-unit
44-
- XDEBUG=true
45-
- script: ./tests/travis/static-unit.sh
46-
php: '7.3'
47-
env:
48-
- TEST_SUITE=static-unit
49-
- XDEBUG=true
50-
- stage: integration
51-
script: ./tests/travis/integration.sh;
52-
env:
53-
- TEST_SUITE=integration
54-
- script: ./tests/travis/integration.sh;
55-
php: '7.2'
56-
env:
57-
- TEST_SUITE=integration
58-
- script: ./tests/travis/integration.sh;
59-
php: '7.3'
60-
env:
61-
- TEST_SUITE=integration
6232
exclude:
6333
- php: '7.1'
6434
env: TEST_SUITE=functional-ee FUNCTIONAL_INDEX=1

tests/travis/integration.sh

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

tests/travis/static-unit.sh

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

0 commit comments

Comments
 (0)