mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 01:02:24 +01:00
As well rename test dir to tests, as Pest does not support dir without s on the end. Also, remove PHP requirement from composer.json as we already have check-in bin/dep and it's better to have the check only in one place (now they already out of sync).
63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
unit:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Validate composer.json and composer.lock
|
|
run: composer validate
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-php-
|
|
|
|
- name: Install dependencies
|
|
if: steps.composer-cache.outputs.cache-hit != 'true'
|
|
run: composer install --prefer-dist --no-progress
|
|
|
|
- name: Run test suite
|
|
run: composer test
|
|
|
|
e2e:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: satackey/action-docker-layer-caching@v0.0.8
|
|
continue-on-error: true
|
|
|
|
- name: Build the docker-compose stack
|
|
run: cd tests/docker && docker-compose build
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-php-
|
|
|
|
- name: Install dependencies
|
|
if: steps.composer-cache.outputs.cache-hit != 'true'
|
|
run: composer install --prefer-dist --no-progress
|
|
|
|
- name: Run E2E test suite
|
|
run: cd tests/docker && docker-compose up --abort-on-container-exit
|