fix: fallback a ProcessDriver cuando FFI está cargado pero restringido #10
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
| name: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| rust-tests: | |
| name: Rust Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Run Rust tests | |
| run: cargo test | |
| php-tests: | |
| name: PHP Tests (PHP ${{ matrix.php }}) | |
| runs-on: ubuntu-latest | |
| needs: rust-tests | |
| strategy: | |
| matrix: | |
| php: ['8.1', '8.2', '8.3', '8.4'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Build native library | |
| run: cargo build | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: ffi | |
| ini-values: ffi.enable=true | |
| - name: Install Composer dependencies | |
| working-directory: wrappers/php | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run PHP tests | |
| working-directory: wrappers/php | |
| run: ./vendor/bin/phpunit |