-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add smoke-test workflow #103
Draft
uuf6429
wants to merge
15
commits into
minkphp:master
Choose a base branch
from
uuf6429:chore/add-smoke-test-workflow
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
cbf7e24
Add smoke-test workflow
uuf6429 5905555
Minor adjustments
uuf6429 181fd1e
Use oldest supported zombie driver
uuf6429 8fa1c21
Set node version
uuf6429 dfdd8f0
Use even older crap
uuf6429 a84be67
Roll back 9 year old downgrade
uuf6429 29de8ee
Remove zombie driver
uuf6429 6d9d92c
Various fixes
uuf6429 10a6657
dvfgsafgnhdbgdbfndnfghz
uuf6429 f20f4b1
Limit minkse2driver to selenium 2
uuf6429 17e1e0e
Fix infinite loops; fix selenium image
uuf6429 a48d28e
Fix many problems
uuf6429 5b7060a
Fix job name
uuf6429 193885c
Various fixes; merge workflows
uuf6429 d7fa83e
Specify branch explicitly; fix Selenium2Driver workflow
uuf6429 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
name: | ||
description: Name of the driver test | ||
required: true | ||
type: string | ||
driverRepoUrl: | ||
description: Git URL of the driver repository | ||
required: true | ||
type: string | ||
driverRepoBranch: | ||
description: Driver repository branch to check out | ||
required: true | ||
type: string | ||
php: | ||
description: PHP version for running tests | ||
required: true | ||
type: string | ||
setUpCmd: | ||
description: Command to run before test | ||
required: false | ||
type: string | ||
testCmd: | ||
description: Command that runs the test | ||
required: true | ||
type: string | ||
tearDownCmd: | ||
description: Command to run after test | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
Test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up workspace for driver repo | ||
# language=bash | ||
run: git clone --single-branch --branch "${{ inputs.driverRepoBranch }}" "${{ inputs.driverRepoUrl }}" . | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
php-version: ${{ inputs.php }} | ||
|
||
- name: Install driver dependencies | ||
# language=bash | ||
run: composer install --no-interaction --ansi --no-progress | ||
|
||
- name: Set up driver test suite as composer dependency | ||
# This is instead of `composer require "mink/driver-testsuite:dev-master#${{ github.sha }}"`, which works with forks | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ./vendor/mink/driver-testsuite | ||
|
||
- name: Set up | ||
# language=bash | ||
run: | | ||
mkdir ./logs | ||
MINK_HOST=0.0.0.0:8002 ./vendor/bin/mink-test-server &> ./logs/mink-test-server.log & | ||
eval "${{ inputs.setUpCmd }}" | ||
curl --retry 5 --retry-all-errors --retry-delay 1 --max-time 10 --head -X GET http://localhost:8002/ | ||
|
||
- name: Run tests | ||
# language=bash | ||
run: eval "${{ inputs.testCmd }}" | ||
|
||
- name: Tear down | ||
# language=bash | ||
run: | | ||
eval "${{ inputs.tearDownCmd }}" | ||
|
||
- name: Upload logs as artifact | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: ${{ inputs.name }}-logs | ||
path: ./logs |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed a major update; it should work much better now and should be relatively easy to follow.
There's one major annoyance (on GitHub's side): they do not evaluate expressions in
job.name
, (that line above), when the job is skipped.This causes some ugly UI:
But the impact is just that, so I think we can live with it.