Skip to content

Text field: use text input if no specific input #4786

Text field: use text input if no specific input

Text field: use text input if no specific input #4786

Workflow file for this run

# To upgrade pinned actions: Use https://github.com/mheap/pin-github-action
name: CI - Integration
on:
push:
branches-ignore:
- "main"
- "release/**"
paths:
- "**"
- "!.github/**"
- ".github/workflows/integration.yml"
- "!.tx/**"
- "!.vscode/**"
- "!assets/**"
- "!panel/scripts/**"
- "!scripts/**"
pull_request:
branches-ignore:
- "main"
- "release/**"
paths:
- "**"
- "!.github/**"
- ".github/workflows/integration.yml"
- "!.tx/**"
- "!.vscode/**"
- "!assets/**"
- "!panel/scripts/**"
- "!scripts/**"
workflow_call:
jobs:
e2e:
name: "E2E tests"
# if on pull request, only run if from a fork
# (our own repo is covered by the push event)
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
timeout-minutes: 5
env:
php: "8.0"
extensions: mbstring, ctype, curl, gd, apcu, memcached
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
with:
path: kirby
- name: Checkout Sandbox
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
with:
repository: getkirby/sandbox
path: sandbox
submodules: true
- name: Preparations
run: |
# set up log directory
mkdir -p ${{ github.workspace }}/_logs
# link Kirby to Sandbox
rm -rf ${{ github.workspace }}/sandbox/kirby
ln -s ${{ github.workspace }}/kirby ${{ github.workspace }}/sandbox/kirby
- name: Setup PHP cache environment
id: ext-cache
uses: shivammathur/cache-extensions@7d0d256df12c7817667b98a7036ddcd7d5b7343b # pin@v1
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
key: e2e-v1
- name: Cache PHP extensions
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v3
with:
path: ${{ steps.ext-cache.outputs.dir }}
key: ${{ steps.ext-cache.outputs.key }}
restore-keys: ${{ steps.ext-cache.outputs.key }}
- name: Setup PHP environment
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # pin@v2
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
coverage: none
- name: Install dependencies
uses: cypress-io/github-action@d69252d52b9a31bad4f418f05ba2bc83687a02eb # pin@v5
with:
working-directory: kirby/panel
runTests: false
- name: Build Panel dist files
run: npm run build
working-directory: kirby/panel
- name: Start the PHP server
run: php -S 127.0.0.1:8000 -t ${{ github.workspace }}/sandbox/public ${{ github.workspace }}/sandbox/router.php &> ${{ github.workspace }}/_logs/php.log &
working-directory: kirby/panel
- name: Run tests
uses: cypress-io/github-action@d69252d52b9a31bad4f418f05ba2bc83687a02eb # pin@v5
with:
working-directory: kirby/panel
install: false
wait-on: "http://127.0.0.1:8000/panel/login"
wait-on-timeout: 5
config: baseUrl=http://127.0.0.1:8000
- name: Print log files
if: always()
run: |
for log in ${{ github.workspace }}/_logs/*; do
echo "::group::$(basename $log)"
cat $log
echo "::endgroup::"
done
- name: Archive Cypress screenshots
if: failure()
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3
with:
name: cypress-screenshots
path: kirby/panel/cypress/screenshots
- name: Archive Cypress videos
if: always()
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3
with:
name: cypress-videos
path: kirby/panel/cypress/videos