Skip to content

Commit

Permalink
Add github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cemag44 authored and cemag44300 committed Nov 21, 2022
1 parent 23d2d3a commit f8e677e
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 15 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'CI'

on:
pull_request: ~
push:
branches:
- 'master'

jobs:
tests:
runs-on: 'ubuntu-latest'

strategy:
matrix:
php-version:
- '7.4'

steps:
- name: 'Checkout'
uses: 'actions/checkout@v3'

- name: 'Install PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'
tools: 'composer:v2'

- name: 'Get composer cache directory'
id: 'composercache'
run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"'

- name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composercache.outputs.dir }}'
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: '${{ runner.os }}-composer-'

- name: 'Prepare credentials'
env:
MAGENTO_USERNAME: '${{ secrets.MAGENTO_USERNAME }}'
MAGENTO_PASSWORD: '${{ secrets.MAGENTO_PASSWORD }}'
run: 'composer config -g http-basic.repo.magento.com "$MAGENTO_USERNAME" "$MAGENTO_PASSWORD"'

- name: 'Install dependencies'
run: 'composer install --prefer-dist'

- name: 'Run PHP CodeSniffer'
run: 'vendor/bin/phpcs --extensions=php,phtml'

- name: 'Run PHPMD'
run: 'vendor/bin/phpmd . xml phpmd.xml.dist'
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## [1.3.7] - 2022-11-21
[1.3.7]: https://github.com/Smile-SA/magento2-module-custom-entity/compare/1.3.6...1.3.7

- Add github actions workflow

## [1.3.6] - 2022-10-19
[1.3.6]: https://github.com/Smile-SA/magento2-module-custom-entity/compare/1.3.5...1.3.6

Expand Down
42 changes: 27 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
"type": "magento2-module",
"description": "Smile - Custom Entity Module",
"keywords": ["magento2", "custom", "entity"],
"authors": [
{
"name": "Aurélien FOUCRET",
"email": "[email protected]"
},
{
"name": "Maxime LECLERCQ",
"email": "[email protected]"
},
{
"name": "Cédric MAGREZ",
"email": "[email protected]"
}
],
"license": "OSL-3.0",
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"magento/composer-dependency-version-audit-plugin": true,
"magento/magento-composer-installer": false
},
"sort-packages": true
},
"repositories": [
{
"type": "composer",
Expand All @@ -16,21 +39,6 @@
"require-dev": {
"smile/magento2-smilelab-quality-suite": "^3.0"
},
"suggest": {
"smile/module-custom-entity-product-link": "Possibility to add product attribute for link product to custom entities",
"smile/module-custom-entity-import-export": "Possibility to import custom entities"
},
"license": "OSL-3.0",
"authors": [
{
"name": "Aurélien FOUCRET",
"email": "[email protected]"
},
{
"name": "Maxime LECLERCQ",
"email": "[email protected]"
}
],
"autoload": {
"files": [
"registration.php"
Expand All @@ -39,6 +47,10 @@
"Smile\\CustomEntity\\" : ""
}
},
"suggest": {
"smile/module-custom-entity-product-link": "Possibility to add product attribute for link product to custom entities",
"smile/module-custom-entity-import-export": "Possibility to import custom entities"
},
"minimum-stability": "dev",
"prefer-stable": true
}

0 comments on commit f8e677e

Please sign in to comment.