Skip to content

Commit

Permalink
Merge pull request #58 from bildvitta/feature/models
Browse files Browse the repository at this point in the history
Adicionando models do Vendas para acessar via Banco
  • Loading branch information
zerossB authored Aug 19, 2024
2 parents d20b497 + 25a7065 commit a37ecda
Show file tree
Hide file tree
Showing 23 changed files with 1,186 additions and 57 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Auto-merge Dependabot PRs for semver-minor updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3.6.0
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.6.0
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.3'
coverage: none

- name: Install composer dependencies
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.0]
laravel: [8.*]
stability: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
php: [8.3]
laravel: [11.*]
stability: [prefer-stable]
include:
- laravel: 8.*
testbench: ^6.23
- laravel: 11.*
testbench: ^9.0

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3.6.0
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, sockets
coverage: none

- name: Setup problem matchers
Expand All @@ -40,8 +40,7 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
composer install --no-interaction --no-progress
- name: Execute tests
run: vendor/bin/pest
4 changes: 2 additions & 2 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3.6.0
uses: actions/checkout@v4
with:
ref: main

Expand All @@ -21,7 +21,7 @@ jobs:
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: main
commit_message: Update CHANGELOG
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ testbench.yaml
vendor
node_modules
.php-cs-fixer.cache
.phpunit.cache
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
$finder = Finder::create()
->exclude('bootstrap')
->exclude('storage')
->exclude('build')
->in(__DIR__);

$config = new Config();
Expand Down
32 changes: 14 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,24 @@
}
],
"require": {
"php": "^8.0|^8.1",
"illuminate/cache": "^8.49|^9.0|^10.0|^11.0",
"illuminate/config": "^8.50|^9.0|^10.0|^11.0",
"php": "^7.4|^8.0|^8.1",
"illuminate/contracts": "^8.0|^9.0|^10.0|^11.0",
"illuminate/log": "^8.65|^9.0|^10.0|^11.0",
"illuminate/routing": "^8.49|^9.0|^10.0|^11.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
"illuminate/view": "^8.49|^9.0|^10.0|^11.0",
"bildvitta/sp-produto": "^0.1",
"spatie/laravel-package-tools": "^1.9.2"
},
"require-dev": {
"nunomaduro/collision": "^5.10",
"nunomaduro/larastan": "^1.0",
"orchestra/testbench": "^6.22",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5",
"spatie/laravel-ray": "^1.26",
"friendsofphp/php-cs-fixer": "^3.1"
"nunomaduro/collision": "^8.1.1||^7.10.0",
"larastan/larastan": "^2.9",
"orchestra/testbench": "^9.0.0||^8.22.0",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-arch": "^2.7",
"pestphp/pest-plugin-laravel": "^2.3",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"spatie/laravel-ray": "^1.35",
"friendsofphp/php-cs-fixer": "^3.1",
"laravel/pint": "^1.14"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 9 additions & 1 deletion config/iss-vendas.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@

'front_uri' => env('MS_VENDAS_FRONT_URI', 'https://develop.vendas.nave.dev'),

'prefix' => env('MS_VENDAS_API_PREFIX', '/api')
'prefix' => env('MS_VENDAS_API_PREFIX', '/api'),

'db' => [
'host' => env('MS_VENDAS_DB_HOST'),
'port' => env('MS_VENDAS_DB_PORT'),
'database' => env('MS_VENDAS_DB_DATABASE'),
'username' => env('MS_VENDAS_DB_USERNAME'),
'password' => env('MS_VENDAS_DB_PASSWORD'),
],
];
4 changes: 1 addition & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ includes:
- phpstan-baseline.neon

parameters:
level: 4
level: 5
paths:
- src
- config
- database
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false

24 changes: 8 additions & 16 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,39 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="iss-vendas Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<logging>
<junit outputFile="build/report.junit.xml" />
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
</source>
</phpunit>
3 changes: 3 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"preset": "laravel"
}
Loading

0 comments on commit a37ecda

Please sign in to comment.