PHP Classes

File: .github/workflows/tests.yml

Recommend this page to a friend!
  Classes of El Amrani Chakir  >  PHP FTP Client Library  >  .github/workflows/tests.yml  >  Download  
File: .github/workflows/tests.yml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP FTP Client Library
Manage files in remote FTP server
Author: By
Last change: tests.yml support php 8.1 for integration tests
Date: 3 months ago
Size: 1,657 bytes
 

Contents

Class file image Download
name: tests

on: [ push, pull_request ]

jobs:
  run:
    runs-on: ${{ matrix.operating-system }}
    strategy:
      matrix:
        operating-system: [ ubuntu-latest ]
        php-versions: [ '7.4', '8.0', '8.1' ]
    name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

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

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: mbstring, intl, zip, ftp
          coverage: none

      - name: Check PHP Version
        run: php -v

      - name: Check Composer Version
        run: composer -V

      - name: Check PHP Extensions
        run: php -m

      - name: Install dependencies for PHP
        run: composer update --prefer-dist --no-progress

      - name: Setup SSL key with openssl
        run: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./vsftpd.key -out ./vsftpd.crt -subj "/C=AU/ST=Test/L=Test/O=Test com. /OU=Open Source World/CN=lazzard"

      - name: Building fake FTP server container
        run: cd tests/integration && docker build -t lazzard/vsftpd .

      - name: Setup fake FTP server
        run: docker run --name vsftpd -d -e LOG_STDOUT=true -e FTP_USER=username -e FTP_PASS=password -e ANONYMOUS_ACCESS=true -p 20-21:20-21 -p 21100-21110:21100-21110 -v $PWD/vsftpd.key:/etc/ssl/private/vsftpd.key -v $PWD/vsftpd.crt:/etc/ssl/certs/vsftpd.crt lazzard/vsftpd

      - name: Set the host to be localhost
        run: sed -i 's/host/172.17.0.2/g' tests/config.php

      - name: Run test suite
        run: vendor/bin/phpunit
For more information send a message to info at phpclasses dot org.