From d8c9b118ed872dc9ffc8fb22ea5910c9d6315322 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 25 Jan 2022 15:49:54 +0100 Subject: [PATCH] test older client versions --- .github/workflows/ci.yaml | 62 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8dcac10..8bcf0ef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -112,7 +112,67 @@ jobs: sudo apt install libjansson4 libcap2 libbsd0 libreadline8 libicu66 sudo mkdir -p /etc/samba /var/lib/samba/private echo "[global]\nclient min protocol = SMB2\nclient max protocol = SMB3" | sudo tee /etc/samba/smb.conf - sudo wget "https://github.com/icewind1991/smbclient-builder/releases/download/v0.1.0/smbclient-${{ matrix.client-version }}" -O /usr/local/bin/smbclient + sudo wget -q "https://github.com/icewind1991/smbclient-builder/releases/download/v0.1.1/smbclient-${{ matrix.client-version }}" -O /usr/local/bin/smbclient + sudo chmod +x /usr/local/bin/smbclient + - uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.0 + extensions: apcu, smbclient + coverage: pcov + - name: Composer + run: composer install + - name: Config + run: | + echo '{"host": "localhost","user": "test","password": "test","share": "test","root": ""}' > tests/config.json + - name: PHPUnit Tests + uses: nick-invision/retry@v2 + with: + timeout_minutes: 2 + max_attempts: 3 + retry_on: timeout + command: php ./vendor/bin/phpunit tests -c tests/phpunit.xml --coverage-clover=coverage.xml + env: + BACKEND: smbclient + - uses: codecov/codecov-action@v1 + with: + files: ./coverage.xml + + smb-old-client-versions: + runs-on: ubuntu-20.04 + name: Unit tests + + strategy: + fail-fast: false + matrix: + client-version: + - "4.6.16" + - "4.5.16" + - "4.4.16" + - "4.3.13" + - "4.2.14" + server-version: + - "latest" + + services: + samba: + image: "servercontainers/samba:${{ matrix.server-version }}" + env: + ACCOUNT_test: test + UID_test: 1000 + SAMBA_VOLUME_CONFIG_test: "[test]; path=/tmp; valid users = test; guest ok = no; read only = no; browseable = yes" + ports: + - 139:139 + - 445:445 + + steps: + - name: Setup smbclient + run: | + sudo apt install libjansson4 libcap2 libbsd0 libreadline8 libicu66 + sudo mkdir -p /etc/samba /var/lib/samba/private + echo "[global]\nclient min protocol = SMB2\nclient max protocol = SMB3" | sudo tee /etc/samba/smb.conf + sudo wget -q "https://github.com/icewind1991/smbclient-builder/releases/download/v0.1.1/smbclient-${{ matrix.client-version }}" -O /usr/local/bin/smbclient sudo chmod +x /usr/local/bin/smbclient - uses: actions/checkout@v2 - name: Setup PHP