Pesos por cooperados #143
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow is provided via the organization template repository | |
# | |
# https://github.com/nextcloud/.github | |
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | |
name: PHPUnit | |
on: pull_request | |
permissions: | |
contents: read | |
concurrency: | |
group: phpunit-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
phpunit: | |
runs-on: ubuntu-latest | |
env: | |
DB_URL: pdo-mysql://root:[email protected]:4444/report | |
DB_URL_AKAUNTING: pdo-mysql://root:[email protected]:4444/akaunting | |
AKAUNTING_COMPANY_ID: 1 | |
AKAUNTING_FRRA_MES_PADRAO: 12 | |
AKAUNTING_RESGATE_SALDO_IRPF_MES_PADRAO: 12 | |
AKAUNTING_DISTRIBUICAO_SOBRAS_CATEGORY_ID: 35 | |
AKAUNTING_PRODUCAO_COOPERATIVISTA_CATEGORY_ID: 11 | |
AKAUNTING_FRRA_CATEGORY_ID: 33 | |
AKAUNTING_ADIANTAMENTO_CATEGORY_ID: 34 | |
AKAUNTING_PLANO_DE_SAUDE_CATEGORY_ID: 29 | |
AKAUNTING_PARENT_DISPENDIOS_CLIENTE_CATEGORY_ID: 28 | |
AKAUNTING_PARENT_DISPENDIOS_INTERNOS_CATEGORY_ID: 16 | |
AKAUNTING_PARENT_ENTRADAS_CLIENTES_CATEGORY_ID: 45 | |
AKAUNTING_IMPOSTOS_COFINS: '{"categoryId":40,"contactId":111,"taxId":1}' | |
AKAUNTING_IMPOSTOS_INSS_IRRF: '{"categoryId":38,"contactId":20,"taxId":2}' | |
AKAUNTING_IMPOSTOS_IRPF_RETIDO: '{"categoryId":42,"contactId":20,"taxId":2}' | |
AKAUNTING_IMPOSTOS_ISS: '{"categoryId":39,"contactId":111,"taxId":4}' | |
AKAUNTING_IMPOSTOS_PIS: '{"categoryId":41,"contactId":111,"taxId":3}' | |
AKAUNTING_IMPOSTOS_ITEM_ID: 14 | |
AKAUNTING_PRODUCAO_COOPERATIVISTA_ITEM_IDS: '{"bruto":26,"INSS":28,"IRRF":29,"Plano":30,"Auxílio":32,"desconto":31,"frra":27}' | |
HOLYDAYS_LIST: br-rj | |
LOCALE: pt_BR | |
CNPJ_CLIENTES_INTERNOS: 00000000000191 | |
CNPJ_COMPANY: 00000000000191 | |
strategy: | |
matrix: | |
php-versions: ['8.3'] | |
services: | |
mysql: | |
image: mysql | |
ports: | |
- 4444:3306/tcp | |
env: | |
MYSQL_HOST: localhost | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: report | |
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Set up php ${{ matrix.php-versions }} | |
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: none | |
ini-file: development | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up dependencies | |
run: composer i | |
- name: Set up database | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: php ./bin/import migrations:migrate -n | |
- name: PHPUnit | |
run: composer run test:unit | |
- name: Print logs | |
if: always() | |
run: | | |
cat storage/logs/system.log |