Skip to content

Commit

Permalink
temp: Added application pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
cyl3x committed Jan 27, 2025
1 parent 950a83b commit b5f8292
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ inputs:
description: Node version file for setup-node
required: false
default: package.json
path:
description: Path to the nodejs project
required: false
default: '.'

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ${{ inputs.node-version-file }}
node-version-file: ${{ inputs.path }}/${{ inputs.node-version-file }}
cache-dependency-path: ${{ inputs.path }}/package-lock.json
cache: npm
- name: Install dependencies
shell: bash
run: npm ci --no-audit --prefer-offline
run: npm ci --prefix "${{ inputs.path }}" --no-audit --prefer-offline
env:
CI: TRUE
6 changes: 5 additions & 1 deletion .github/actions/setup-php/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
description: PHP version for setup-php
required: false
default: '8.3'
path:
description: Path to the PHP project
required: false
default: '.'

runs:
using: composite
Expand All @@ -26,4 +30,4 @@ runs:
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
shell: bash
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --working-dir="${{ inputs.path }}" --prefer-dist --no-progress --no-suggest
70 changes: 70 additions & 0 deletions .github/workflows/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Application tests
on:
workflow_dispatch:
pull_request:
paths:
- '**/*.php'
- '*.dist'
- composer.json
- composer.lock
- symfony.lock
- infection.json5
- .php-cs-fixer.dist.php
- phpstan.neon
- .github/workflows/php.yml

jobs:
application:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.11
env:
MARIADB_ROOT_PASSWORD: root
MYSQL_DATABASE: swagbraintree_test
ports: ['3306:3306']
steps:
- name: Setup Shopware
uses: shopware/setup-shopware@main
env:
DATABASE_URL: mysql://root:[email protected]:3306/shopware
with:
shopware-version: trunk
mysql-version: skip # will use a service
install: true
install-admin: true
install-storefront: true
path: shopware
- uses: actions/checkout@v4
with:
path: braintree
- name: Setup Braintree (PHP)
uses: ./braintree/.github/actions/setup-php
with:
path: braintree
- name: Setup Braintree (Node)
uses: ./braintree/.github/actions/setup-node
with:
path: braintree
- name: Setup Braintree (Database)
env:
APP_URL: http://localhost:8001
DATABASE_URL: mysql://root:[email protected]:3306/swagbraintree
run: composer -d braintree setup
- name: Start Braintree
working-directory: braintree
env:
APP_URL: http://localhost:8001
DATABASE_URL: mysql://root:[email protected]:3306/swagbraintree
SYMFONY_DAEMON: '1'
SYMFONY_NO_TLS: '1'
SYMFONY_ALLOW_HTTP: '1'
SYMFONY_PORT: '8001'
SYMFONY_ALLOW_ALL_IP: '1'
run: symfony server:start
- name: Install Braintree
env:
DATABASE_URL: mysql://root:[email protected]:3306/shopware
run: |
ln -s braintree shopware/custom/apps/SwagBraintreeApp
shopware/bin/console app:install -ac SwagBraintreeApp

0 comments on commit b5f8292

Please sign in to comment.