57 lines (52 loc) · 1.89 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: m2-actions-sips2-test
on: [push]
jobs:
magento2-build:
runs-on: ubuntu-latest
container: ubuntu
name: 'm2 tests & build'
services:
mysql:
image: docker://mysql:8.0
env:
MYSQL_ROOT_PASSWORD: magento
MYSQL_DATABASE: magento
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
elasticsearch:
image: docker://elasticsearch:7.1.0
ports:
- 9200:9200
options: -e="discovery.type=single-node" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
steps:
#- name: Cleaning up the $GITHUB_WORKSPACE as root from a Docker image
# run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true
- uses: actions/checkout@v2
- name: 'install fresh magento repo'
if: ${{true}}
uses: MAD-I-T/magento-actions@v3.10
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'create-project'
magento_version: 2.4.4
no_push: 1 ## add this arg to not push to the repo ideal for quick test on specific version
- name: 'phpcs testing'
uses: MAD-I-T/magento-actions@master
with:
php: '7.4'
override_settings: 1
process: 'phpcs-test'
extension: 'Madit/Sips2/'
severity: 10
standard: 'Magento2'
- name: 'launch magento2 unit test'
uses: MAD-I-T/magento-actions@master
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
process: 'unit-test'
unit_test_config: 'dev/tests/unit/phpunit.xml.dist'
unit_test_subset_path: '../Madit/Sips2'
elasticsearch: 1