-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (55 loc) · 1.97 KB
/
ci.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: continuous-integration
on:
push:
branches: [ main ]
concurrency:
group: 'continuous-integration'
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
magento-version: [ '2.4.6' ]
env:
MAGENTO_MARKETPLACE_USERNAME: ${{ secrets.MAGENTO_MARKETPLACE_USERNAME }}
MAGENTO_MARKETPLACE_PASSWORD: ${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 19
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
tools: composer:2
php-version: 8.1
coverage: none
- name: Setup Magento Repository Credentials
run: |
composer global config http-basic.repo.magento.com "${MAGENTO_MARKETPLACE_USERNAME}" "${MAGENTO_MARKETPLACE_PASSWORD}"
- name: Create Magento Project
run: |
composer create-project --no-install --repository-url=https://repo.magento.com/ magento/project-community-edition=${{ matrix.magento-version }} "$GITHUB_WORKSPACE/magento"
- name: Cache Magento Project
id: cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/magento
key: magento-${{ runner.os }}-${{ matrix.magento-version }}
- name: Install Composer Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: composer install --ignore-platform-reqs --no-interaction
working-directory: ${{ github.workspace }}/magento
- name: Add config.php file to Magento
run: cp .github/_fixtures/config.php.dist "$GITHUB_WORKSPACE/magento/app/etc/config.php"
- run: pnpm i
- run: pnpm lint
- run: pnpm test
env:
MAGEFRONT_TEST_MAGENTO_ROOT: ${{ github.workspace }}/magento