Skip to content

Commit

Permalink
Add delivery CI (tentative)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido committed May 22, 2024
1 parent 097b17c commit 0dddc03
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 43 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/php-test.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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

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
- name: Set up PHP ${{ matrix.php-version }}
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-version }}
- name: Test with phpunit
if: ${{ matrix.php-version == '8.3' &&
github.event.pull_request.head.repo.full_name == github.repository &&
github.actor != 'dependabot[bot]' }}
run: |
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'
steps:
- uses: actions/checkout@v4
- name: Set up PHP ${{ matrix.php-version }}
uses: php-actions/composer@v6
with:
php_version: "8.x"

0 comments on commit 0dddc03

Please sign in to comment.