Skip to content

Commit

Permalink
Merge pull request #92 from eclipxe13/fix-build-20220318
Browse files Browse the repository at this point in the history
Fix build 2022-03-18
  • Loading branch information
eclipxe13 authored Mar 19, 2022
2 parents 5d569fc + 21b0171 commit 86cc8bd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install libsaxonb-java on nektos/act
if: matrix.operating-systems == 'ubuntu-latest' && github.actor == 'nektos/act'
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq default-jre
uses: actions/checkout@v3

- name: Install libsaxonb-java on linux
if: matrix.operating-systems == 'ubuntu-latest'
run: sudo apt-get install -y -qq libsaxonb-java
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq default-jre libsaxonb-java
- name: Install saxonhe on windows
if: matrix.operating-systems == 'windows-latest'
Expand Down Expand Up @@ -90,7 +86,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

# see https://github.com/marketplace/actions/setup-php-action
- name: Setup PHP
Expand All @@ -103,14 +101,11 @@ jobs:
env:
fail-fast: true

- name: Install libsaxonb-java on nektos/act
if: matrix.operating-systems == 'ubuntu-latest' && github.actor == 'nektos/act'
- name: Install libsaxonb-java on linux
if: matrix.operating-systems == 'ubuntu-latest'
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq default-jre
- name: Install libsaxonb-java
run: sudo apt-get install -y -qq libsaxonb-java
sudo apt-get install -y -qq default-jre libsaxonb-java
- name: Get composer cache directory
id: composer-cache
Expand Down Expand Up @@ -149,9 +144,10 @@ jobs:
run: vendor/bin/phpstan analyse --no-progress --verbose src/ tests/

- name: Upload code coverage to scrutinizer
uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: "--format=php-clover build/coverage-clover.xml"
run: |
mkdir -p build/scrutinizer
composer require scrutinizer/ocular:dev-master --working-dir=build/scrutinizer --no-progress
php build/scrutinizer/vendor/bin/ocular code-coverage:upload -vvv --no-interaction --format=php-clover build/coverage-clover.xml
# see https://github.com/marketplace/actions/mkdocs-action
- name: Run mkdocs
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ When you do begin working on your feature, here are some guidelines to consider:

## Check the code style

If you are having issues with coding standars then run:
If you are having issues with coding standards then run:

```shell
composer dev:check-style
Expand Down
10 changes: 10 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
- Remove classes `CfdiUtils\Elements\Cfdi33\Helpers\SumasConceptosWriter` and `CfdiUtils\Elements\Cfdi40\Helpers\SumasConceptosWriter`.


## Unreleased 2022-03-18

Fix build since GitHub Action `sudo-bot/action-scrutinizer` is failing.
Use `scrutinizer/ocular` package instead.

Test: When creating a pago, use `addSumasConceptos` to populate `SubTotal` and `Total`.

CI: Always run `apt-get update` before `apt-get install`.


## Version 2.20.1 2022-03-08

Add PHP 8.1 minimal compatibility.
Expand Down
5 changes: 3 additions & 2 deletions tests/CfdiUtilsTests/CreateComprobantePagos33CaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public function testCreateComprobantePagos()
'TipoDeComprobante' => 'P', // pago
'LugarExpedicion' => '52000',
'Moneda' => 'XXX',
'Total' => '0',
'SubTotal' => '0',
]);
$creator->putCertificado($certificado, false);

Expand Down Expand Up @@ -83,6 +81,9 @@ public function testCreateComprobantePagos()
// add the "complemento de pagos" ($complementoPagos) to the $comprobante
$comprobante->addComplemento($complementoPagos);

// use this method (with 0 decimals) to add attributes
$creator->addSumasConceptos(null, 0);

// add sello and validate to assert that the specimen does not have any errors
$creator->addSello('file://' . $keyfile, '');

Expand Down

0 comments on commit 86cc8bd

Please sign in to comment.