Skip to content

Refresh onfido-php after onfido-openapi-spec update (62dc554) #23

Refresh onfido-php after onfido-openapi-spec update (62dc554)

Refresh onfido-php after onfido-openapi-spec update (62dc554) #23

Workflow file for this run

# This workflow will install PHP dependencies, run tests and lint with a variety of PHP versions
# For more information see: https://github.com/marketplace/actions/composer-php-actions
# No particular step needed for publishing, package will be available on https://packagist.org just after release
name: PHP CI
on:
push:
branches:
- master
- "release/**"
pull_request:
branches:
- master
- "release/**"
workflow_dispatch:
release:
types:
- published
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.3"]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-composer${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}2
restore-keys: |
${{ runner.os }}-composer${{ matrix.php-version }}-
- name: Set up PHP ${{ matrix.php-version }}
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-version }}
- name: Test with phpunit
if: ${{ github.event.pull_request.head.repo.full_name == github.repository &&
github.actor != 'dependabot[bot]' }}
run: |
ls -lh /tmp/composer-cache
vendor/bin/phpunit
env:
ONFIDO_API_TOKEN: ${{ secrets.ONFIDO_API_TOKEN }}
ONFIDO_SAMPLE_APPLICANT_ID: ${{ secrets.ONFIDO_SAMPLE_APPLICANT_ID }}
ONFIDO_SAMPLE_VIDEO_ID_1: ${{ secrets.ONFIDO_SAMPLE_VIDEO_ID_1 }}
ONFIDO_SAMPLE_VIDEO_ID_2: ${{ secrets.ONFIDO_SAMPLE_VIDEO_ID_2 }}
ONFIDO_SAMPLE_MOTION_ID_1: ${{ secrets.ONFIDO_SAMPLE_MOTION_ID_1 }}
ONFIDO_SAMPLE_MOTION_ID_2: ${{ secrets.ONFIDO_SAMPLE_MOTION_ID_2 }}
publish:
runs-on: ubuntu-latest
needs: integration-tests
if: github.event_name == 'release'
environment: delivery
steps:
- name: Notify packagist.org about the new package
continue-on-error: true
run: |
curl -XPOST -H'content-type:application/json' \
'https://packagist.org/api/update-package?username=$USERNAME&apiToken=$API_TOKEN' \
-d'{"repository":{"url":"onfido/onfido-php"}}'
env:
USERNAME: onfido
API_TOKEN: ""