unit-test #20
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: unit-test | |
on: | |
workflow_run: | |
workflows: ["Notify unit test"] | |
types: | |
- completed | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
# adds a way to have this workflow reflect on the pull request | |
- uses: haya14busa/action-workflow_run-status@v1 | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
# checkouts the commit that triggered the Notify unit test workflow | |
ref: ${{ github.event.workflow_run.head_sha }} | |
- name: cached dependencies | |
uses: actions/cache@v2 | |
id: cached-dependencies | |
with: | |
path: ./vendor | |
# the key will change if composer.lock changes | |
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/composer.lock') }} | |
- name: install dependencies | |
if: steps.cached-dependencies.outputs.cache-hit != 'true' | |
uses: php-actions/composer@v6 | |
- name: run tests | |
run: composer run test |