Skip to content

Commit 0422af4

Browse files
committed
Update GitHub Actions
1 parent f76c182 commit 0422af4

10 files changed

+108
-41
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github: yireo
2+
custom: ["https://www.paypal.me/yireo"]
3+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server=redis --cache-backend-redis-db=0 -n
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
composer config minimum-stability dev
3+
composer config prefer-stable false
4+
5+
composer require --dev yireo/magento2-integration-test-helper --no-update
6+
7+
composer require yireo/magento2-replace-bundled:^4.0 --no-update
8+
composer require yireo/magento2-replace-inventory:^4.0 --no-update
9+
composer require yireo/magento2-replace-pagebuilder:^4.0 --no-update
Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: ExtDN Integration Tests
2-
on: [push, pull_request]
2+
on: [push]
33

44
jobs:
55
integration-tests:
66
name: Magento 2 Integration Tests
77
runs-on: ubuntu-latest
88
services:
99
mysql:
10-
image: mysql:5.7
10+
image: mysql:8.0
1111
env:
1212
MYSQL_ROOT_PASSWORD: root
1313
ports:
1414
- 3306:3306
15-
options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
15+
options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping"
1616
es:
1717
image: docker.io/wardenenv/elasticsearch:7.8
1818
ports:
@@ -22,18 +22,36 @@ jobs:
2222
'xpack.security.enabled': false
2323
ES_JAVA_OPTS: "-Xms64m -Xmx512m"
2424
options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3
25+
redis:
26+
image: redis
27+
ports:
28+
- 6379:6379
29+
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
2530
env:
2631
MAGENTO_MARKETPLACE_USERNAME: ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }}
2732
MAGENTO_MARKETPLACE_PASSWORD: ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }}
2833
MODULE_NAME: ${{ secrets.MODULE_NAME }}
2934
COMPOSER_NAME: ${{ secrets.COMPOSER_NAME }}
3035
steps:
3136
- uses: actions/checkout@v2
32-
- uses: extdn/github-actions-m2/magento-integration-tests/7.3@master
33-
env:
34-
CE_VERSION: 2.3.5-p2
35-
- uses: actions/checkout@v2
36-
- uses: extdn/github-actions-m2/magento-integration-tests/7.4@master
37+
- name: Cache Composer dependencies
38+
uses: actions/cache@v2
39+
with:
40+
path: /tmp/composer-cache
41+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
42+
43+
- uses: extdn/github-actions-m2/magento-integration-tests/8.3@master
3744
env:
38-
CE_VERSION: 2.4.1
45+
MAGENTO_VERSION: '2.4.7-p1'
46+
COMPOSER_VERSION: 2
47+
with:
48+
magento_pre_install_script: .github/workflows/extdn-integration-tests-pre-install.sh
49+
magento_post_install_script: .github/workflows/extdn-integration-tests-post-install.sh
3950

51+
- uses: extdn/github-actions-m2/magento-integration-tests/8.3@master
52+
env:
53+
MAGENTO_VERSION: '2.4.7-p1'
54+
COMPOSER_VERSION: 2
55+
with:
56+
magento_pre_install_script: .github/workflows/extdn-integration-tests-pre-install.sh
57+
magento_post_install_script: .github/workflows/extdn-integration-tests-post-install.sh
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
composer config minimum-stability dev
3+
composer config prefer-stable false
4+
5+
composer require yireo/magento2-integration-test-helper --no-update
6+
7+
composer config --no-plugins allow-plugins true
8+
9+
composer require --dev phpstan/extension-installer --no-update
10+
composer require --dev bitexpert/phpstan-magento --no-update
11+
12+
composer require yireo/magento2-replace-bundled:^4.0 --no-update
13+
composer require yireo/magento2-replace-inventory:^4.0 --no-update
14+
composer require yireo/magento2-replace-pagebuilder:^4.0 --no-update
Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1-
name: ExtDN M2 PHPStan
1+
name: ExtDN PHPStan
22
on: [push, pull_request]
33

44
jobs:
55
phpstan:
6-
name: M2 PHPStan
6+
name: PHPStan
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- uses: extdn/github-actions-m2/magento-phpstan@master
10+
11+
- name: "Determine composer cache directory"
12+
id: "determine-composer-cache-directory"
13+
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
14+
15+
- name: Cache Composer dependencies
16+
uses: actions/cache@v2
17+
with:
18+
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
19+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
20+
21+
- uses: extdn/github-actions-m2/magento-phpstan/8.3@master
1122
with:
12-
composer_name: ${{ secrets.COMPOSER_NAME }}
23+
composer_name: yireo/magento2-taxratesmanager2
24+
composer_version: 2
25+
phpstan_level: 2
26+
magento_pre_install_script: .github/workflows/extdn-phpstan-pre-install.sh

.github/workflows/extdn-static-tests.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: ExtDN Unit Tests
2+
on: [push]
3+
4+
jobs:
5+
unit-tests:
6+
name: Magento 2 Unit Tests
7+
runs-on: ubuntu-latest
8+
env:
9+
MAGENTO_MARKETPLACE_USERNAME: ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }}
10+
MAGENTO_MARKETPLACE_PASSWORD: ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }}
11+
MODULE_NAME: ${{ secrets.MODULE_NAME }}
12+
COMPOSER_NAME: ${{ secrets.COMPOSER_NAME }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Cache Composer dependencies
17+
uses: actions/cache@v2
18+
with:
19+
path: /tmp/composer-cache
20+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
21+
22+
- uses: extdn/github-actions-m2/magento-unit-tests/7.4@master
23+
env:
24+
MAGENTO_VERSION: '2.3.7-p3'
25+
COMPOSER_VERSION: 1
26+
27+
- uses: extdn/github-actions-m2/magento-unit-tests/8.3@master
28+
env:
29+
MAGENTO_VERSION: '2.4.7-p2'
30+
COMPOSER_VERSION: 2

.github/workflows/extdn_unit_tests.yml

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

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
excludePaths:
3+
- */Test/*/*
4+
- MageWire/Component.php
5+
- MageWire/Checkout.php

0 commit comments

Comments
 (0)