test: add test with setDisableExternalChecks(true) #96
Workflow file for this run
This file contains hidden or 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
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| platform: linux-amd64 | |
| php-version: "8.3" | |
| - os: ubuntu-24.04-arm | |
| platform: linux-arm64 | |
| php-version: "8.3" | |
| - os: macos-latest | |
| platform: darwin-arm64 | |
| php-version: "8.3" | |
| name: Test on ${{ matrix.platform }} (PHP ${{ matrix.php-version }}) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.24" | |
| - name: Build shared library for platform | |
| run: make build-${{ matrix.platform }} | |
| - name: Validate composer.json | |
| run: composer validate --strict | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-interaction | |
| - name: Run static analysis | |
| run: composer run phpstan | |
| - name: Run linter | |
| run: composer run cs | |
| - name: Build publiccode-parser CLI (pinned by go-src/go.mod) | |
| run: | | |
| mkdir -p "$GITHUB_WORKSPACE/bin" | |
| go build -C go-src -o "$GITHUB_WORKSPACE/bin/publiccode-parser" \ | |
| github.com/italia/publiccode-parser-go/v5/publiccode-parser | |
| - name: Add bin to PATH | |
| run: echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | |
| - name: Download test fixtures | |
| run: | | |
| VERSION=$(go list -C go-src -m -f '{{.Version}}' github.com/italia/publiccode-parser-go/v5) | |
| git clone --depth 1 --branch $VERSION https://github.com/italia/publiccode-parser-go.git /tmp/publiccode-parser-go | |
| mv /tmp/publiccode-parser-go/testdata/* tests/fixtures/testdata/ | |
| - name: Run tests | |
| run: composer run test |