Skip to content

Commit 41c3873

Browse files
committed
Beautify GitHub Action static test
1 parent 306a1e2 commit 41c3873

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/static-tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,29 @@ on: ['push', 'pull_request']
44
jobs:
55
static-tests:
66
name: Magento 2 Static Tests
7-
runs-on: self-hosted
8-
#runs-on: ubuntu-latest
7+
#runs-on: self-hosted
8+
runs-on: ubuntu-latest
99
container:
1010
image: yireo/magento2installed:2.4.7-p4
1111
steps:
1212
- name: Checkout sources
1313
uses: actions/checkout@v4
1414

15+
- name: Configure GitLab
16+
run: |
17+
test -n "${{ secrets.GITLAB_TOKEN }}" || exit 0
18+
cd /tmp/magento
19+
composer config --auth gitlab-token.gitlab.yireo.com ${{ secrets.GITLAB_TOKEN }}
20+
composer config repositories.loki-checkout composer https://gitlab.yireo.com/api/v4/group/loki-checkout/-/packages/composer/packages.json
21+
1522
- name: Add module source
1623
run: |
1724
export COMPOSER_NAME=`cat .module.ini | grep COMPOSER_NAME | cut -f2 -d= | tr -d '"'`
1825
cp -R ${GITHUB_WORKSPACE} /tmp/magento/package-source
1926
cd /tmp/magento
2027
composer config repositories.local-source path package-source/
2128
composer config --no-plugins allow-plugins true
22-
composer require --prefer-source -- ${COMPOSER_NAME}:@dev
29+
composer require --prefer-source -- ${COMPOSER_NAME}:@dev yireo/magento2-integration-test-helper
2330
composer require --dev --prefer-source -- phpstan/phpstan bitexpert/phpstan-magento phpstan/extension-installer
2431
2532
- name: Run Magento 2 PHPStan Tests

0 commit comments

Comments
 (0)