Skip to content

Commit

Permalink
chore(e2e): optimize e2e workflow (#91)
Browse files Browse the repository at this point in the history
* chore(e2e): optimize e2e workflow
  • Loading branch information
gearsdigital authored Apr 16, 2023
1 parent cbf1757 commit 95e2a9c
Showing 1 changed file with 8 additions and 130 deletions.
138 changes: 8 additions & 130 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,105 +7,25 @@ on:
branches: [ main ]

jobs:
test_3-6:
test:
runs-on: ubuntu-latest

name: Kirby 3.6
steps:

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: composer

- name: Set up Kirby
run: |
composer create-project getkirby/starterkit="3.6.*" --no-install
cd ./starterkit
composer config allow-plugins.composer/installers true
composer config allow-plugins.composer/composer true
composer config allow-plugins.getkirby/composer-installer true
composer install
- name: Checkout
uses: actions/checkout@v3
with:
path: ./starterkit/site/plugins/enhanced-toolbar-link-dialog

- name: Prepare
run: |
mv ./starterkit/site/blueprints/pages/note.yml ./starterkit/site/blueprints/pages/note.yml.bak
cp ./starterkit/site/plugins/enhanced-toolbar-link-dialog/cypress/fixtures/note.yml ./starterkit/site/blueprints/pages/note.yml
- name: Start Webserver
run: |
cd ./starterkit
nohup php -S localhost:8000 kirby/router.php > /dev/null 2>&1 &
- name: Run Cypress
uses: cypress-io/github-action@v4
with:
working-directory: ./starterkit/site/plugins/enhanced-toolbar-link-dialog
record: false
browser: firefox

test_3-7:
runs-on: ubuntu-latest

name: Kirby 3.7
steps:

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: composer

- name: Set up Kirby
run: |
composer create-project getkirby/starterkit="3.7.*" --no-install
cd ./starterkit
composer config allow-plugins.composer/installers true
composer config allow-plugins.composer/composer true
composer config allow-plugins.getkirby/composer-installer true
composer install
- name: Checkout
uses: actions/checkout@v3
with:
path: ./starterkit/site/plugins/enhanced-toolbar-link-dialog
strategy:
matrix:
php-version: [ '8.1' ]
kirby-version: [ '3.6.*', '3.7.*', '3.8.*', '3.9.*' ]

- name: Prepare
run: |
mv ./starterkit/site/blueprints/pages/note.yml ./starterkit/site/blueprints/pages/note.yml.bak
cp ./starterkit/site/plugins/enhanced-toolbar-link-dialog/cypress/fixtures/note.yml ./starterkit/site/blueprints/pages/note.yml
- name: Start Webserver
run: |
cd ./starterkit
nohup php -S localhost:8000 kirby/router.php > /dev/null 2>&1 &
- name: Run Cypress
uses: cypress-io/github-action@v4
with:
working-directory: ./starterkit/site/plugins/enhanced-toolbar-link-dialog
record: false
browser: firefox

test_3-8:
runs-on: ubuntu-latest

name: Kirby 3.8
name: Kirby ${{ matrix.kirby-version }} - PHP ${{ matrix.php-version }}
steps:

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: ${{ matrix.php-version }}
tools: composer

- name: Set up Kirby
run: |
composer create-project getkirby/starterkit="3.8.*" --no-install
composer create-project getkirby/starterkit="${{ matrix.kirby-version }}" --no-install
cd ./starterkit
composer config allow-plugins.composer/installers true
composer config allow-plugins.composer/composer true
Expand All @@ -126,52 +46,10 @@ jobs:
run: |
cd ./starterkit
nohup php -S localhost:8000 kirby/router.php > /dev/null 2>&1 &
- name: Run Cypress
uses: cypress-io/github-action@v4
with:
working-directory: ./starterkit/site/plugins/enhanced-toolbar-link-dialog
record: false
browser: firefox

test_3-9:
runs-on: ubuntu-latest

name: Kirby 3.9
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer

- name: Set up Kirby
run: |
composer create-project getkirby/starterkit="3.9.*" --no-install
cd ./starterkit
composer config allow-plugins.composer/installers true
composer config allow-plugins.composer/composer true
composer config allow-plugins.getkirby/composer-installer true
composer install
- name: Checkout
uses: actions/checkout@v3
with:
path: ./starterkit/site/plugins/enhanced-toolbar-link-dialog

- name: Prepare
run: |
mv ./starterkit/site/blueprints/pages/note.yml ./starterkit/site/blueprints/pages/note.yml.bak
cp ./starterkit/site/plugins/enhanced-toolbar-link-dialog/cypress/fixtures/note.yml ./starterkit/site/blueprints/pages/note.yml
- name: Start Webserver
run: |
cd ./starterkit
nohup php -S localhost:8000 kirby/router.php > /dev/null 2>&1 &
- name: Run Cypress
uses: cypress-io/github-action@v4
with:
working-directory: ./starterkit/site/plugins/enhanced-toolbar-link-dialog
record: false
browser: firefox

0 comments on commit 95e2a9c

Please sign in to comment.