Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #60 from pmclain/repo-structure
Browse files Browse the repository at this point in the history
v2.1.0
  • Loading branch information
pmclain authored Aug 8, 2018
2 parents 5bc08cb + a009284 commit 5ec45ea
Show file tree
Hide file tree
Showing 147 changed files with 788 additions and 213 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
/.idea

/dev/magento
/dev/composer.env
70 changes: 19 additions & 51 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,27 @@
sudo: required
dist: trusty
group: edge
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- postfix
hosts:
- magento2.travis
language: php
services:
- docker
matrix:
include:
- php: 7.1
env:
- MAGENTO_VERSION=2.2-develop
- env:
- MAGENTO_VERSION=~2.2
- TEST_SUITE=unit
- php: 7.1
env:
- MAGENTO_VERSION=2.2-develop
- env:
- MAGENTO_VERSION=~2.2
- TEST_SUITE=integration
- php: 7.1
env:
- MAGENTO_VERSION=2.2.4
- TEST_SUITE=unit
- php: 7.1
env:
- MAGENTO_VERSION=2.2.4
- TEST_SUITE=integration
- php: 7.0
env:
- MAGENTO_VERSION=2.2-develop
- TEST_SUITE=unit
- php: 7.0
env:
- MAGENTO_VERSION=2.2-develop
- TEST_SUITE=integration
- php: 7.0
env:
- MAGENTO_VERSION=2.2.4
- TEST_SUITE=unit
- php: 7.0
env:
- MAGENTO_VERSION=2.2.4
- TEST_SUITE=integration
env:
global:
- COMPOSER_BIN_DIR=~/bin
- STRIPE_MOCK_VERSION=0.5.0
- COMPOSER_PACKAGE_NAME=pmclain/module-stripe
- env:
- MAGENTO_VERSION=~2.2
- TEST_SUITE=acceptance
cache:
apt: true
directories:
- $HOME/.composer/cache
- stripe-mock
before_script: ./.travis/before_script.sh
script: phpunit -c magento2/dev/tests/$TEST_SUITE
before_script:
- echo "COMPOSER_MAGENTO_USERNAME=$COMPOSER_MAGENTO_USERNAME" >> dev/composer.env
- echo "COMPOSER_MAGENTO_PASSWORD=$COMPOSER_MAGENTO_PASSWORD" >> dev/composer.env
- echo "COMPOSER_GITHUB_TOKEN=$COMPOSER_GITHUB_TOKEN" >> dev/composer.env
- sed -E -i "s/MAGENTO_VERSION=.*/MAGENTO_VERSION=${MAGENTO_VERSION}/" dev/docker-compose.yml
- docker-compose -f dev/docker-compose.yml build
- docker-compose -f dev/docker-compose.yml up -d
- docker-compose -f dev/docker-compose.yml exec app module-installer
script:
- docker-compose -f dev/docker-compose.yml exec app test-${TEST_SUITE}
74 changes: 0 additions & 74 deletions .travis/before_script.sh

This file was deleted.

23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ In your Magento 2 root directory run
## Magento Version Requirements
| Release | Magento Version |
| ------- | --------------- |
| 2.x.x | 2.2.x |
| 2.1.x | >=2.2.5 |
| 2.0.x | 2.2.0-2.2.4 |
| 1.x.x   | 2.1.x           |
| None | 2.0.x |

Expand All @@ -39,5 +40,25 @@ There is no ETA for implementation, but here is the list in order of priority.
1. Multi-shipping address support
2. Stripe Radar

## Testing and Local Development
**WARNING**
The docker setup included is intended for local development only.

### Local Development
`cd ./dev`
`docker-compose up -d`
`docker-compose exec app module-installer`
`docker-compose exec app magento-installer`

Create the host entry `127.0.0.1 stripe.docker`

### Execute Tests
* Setup
`docker-compose -f dev/docker-compose.yml up -d`
`docker-compose -f dev/docker-compose.yml exec app module-installer`
* Unit - `docker-compose -f dev/docker-compose.yml exec app test-unit`
* Integration - `docker-compose -f dev/docker-compose.yml exec app test-integration`
* Acceptance - `docker-compose -f dev/docker-compose.yml exec app test-acceptance`

## License
Open Software License v3.0
73 changes: 0 additions & 73 deletions Test/Integration/phpunit.xml.dist

This file was deleted.

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"license": "OSL-3.0",
"require": {
"php": "~7.0.0||~7.1.0||~7.2.0",
"magento/framework": "~101.0.0||~100.3.0-dev",
"magento/framework": "~101.0.5||~100.3.0-dev",
"stripe/stripe-php": "~6.7.0"
},
"autoload": {
"files": [
"registration.php"
"src/registration.php"
],
"psr-4": {
"Pmclain\\Stripe\\": ""
"Pmclain\\Stripe\\": "src/"
}
}
}
3 changes: 3 additions & 0 deletions dev/composer.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
COMPOSER_MAGENTO_USERNAME=0000
COMPOSER_MAGENTO_PASSWORD=0000
COMPOSER_GITHUB_TOKEN=0000
86 changes: 86 additions & 0 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
version: "3"
services:
web:
build: ./nginx
ports:
- "80:80"
- "443:443"
links:
- app
networks:
default:
aliases:
- stripe.docker
volumes:
- ./magento:/var/www/magento
environment:
- VIRTUAL_HOST=stripe.docker

app:
build: ./php71
links:
- db
- redis
- amqp
- mailcatcher
- stripemock
volumes:
- ~/.composer/cache:/root/.composer/cache
- ./magento:/var/www/magento:cached
- ..:/module
env_file:
- ./composer.env
environment:
- PHP_IDE_CONFIG=serverName=stripe.docker
- XDEBUG_ENABLE=true
- MAGENTO_RUN_MODE=developer
- MAGENTO_VERSION=~2.2
- MAGENTO_URL=https://stripe.docker

db:
image: mariadb:10
user: mysql
ports:
- "9306:3306"
volumes:
- dbdata:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=magento
- MYSQL_DATABASE=magento
- MYSQL_USER=magento
- MYSQL_PASSWORD=magento

redis:
image: redis
ports:
- 6379

amqp:
image: rabbitmq:3-management
ports:
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASSWORD=guest

mailcatcher:
image: helder/mailcatcher
ports:
- "1080:80"

chrome:
image: selenium/standalone-chrome-debug
ports:
- "49338:5900"

stripemock:
image: stripemock/stripe-mock
ports:
- 12111
- 12112

volumes:
dbdata:

networks:
default:
Loading

0 comments on commit 5ec45ea

Please sign in to comment.