Skip to content

docs: align README env examples with VAULT naming #9

docs: align README env examples with VAULT naming

docs: align README env examples with VAULT naming #9

Workflow file for this run

# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
name: PHPUnit
on: pull_request
permissions:
contents: read
concurrency:
group: phpunit-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
phpunit:
name: PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.2", "8.3", "8.4"]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: ${{ matrix.php-version }}
extensions: openssl, dom, soap
coverage: xdebug
ini-file: development
ini-values: disable_functions=
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run unit tests
env:
XDEBUG_MODE: coverage
NFS_TEST_CNPJ: "11222333000181"
NFS_SANDBOX: "true"
run: composer run test:coverage
- name: Run integration tests (only when cert secrets present)
if: ${{ env.NFSE_CLIENT_CERT_B64 != '' }}
env:
XDEBUG_MODE: debug
NFSE_CLIENT_CERT_B64: ${{ secrets.NFSE_CLIENT_CERT_B64 }}
NFSE_CLIENT_KEY_B64: ${{ secrets.NFSE_CLIENT_KEY_B64 }}
NFS_TEST_CNPJ: "11222333000181"
NFS_SANDBOX: "true"
run: composer run test:integration
- name: Upload coverage results to Coveralls
if: ${{ matrix.php-version == '8.2' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: php-${{ matrix.php-version }}
run: vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml --json_path=build/logs/coveralls-upload.json -v
finish-coverage:
if: ${{ github.event.pull_request.base.ref == 'main' }}
needs: phpunit
runs-on: ubuntu-latest
steps:
- name: Let Coveralls know that all tests have finished
uses: coverallsapp/github-action@v2.3.7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true