Skip to content

Commit d003ec8

Browse files
committed
added pipeline for firefox
1 parent 5774022 commit d003ec8

File tree

4 files changed

+48
-1
lines changed

4 files changed

+48
-1
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: WebDriver Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- run: docker run -d --net=host --shm-size=2g selenium/standalone-firefox:3.141.59-oxygen
18+
19+
- name: Validate composer.json and composer.lock
20+
run: composer validate --strict
21+
22+
- name: Cache Composer packages
23+
id: composer-cache
24+
uses: actions/cache@v2
25+
with:
26+
path: vendor
27+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
28+
restore-keys: |
29+
${{ runner.os }}-php-
30+
31+
- name: Install dependencies
32+
run: composer install --prefer-dist --no-progress
33+
34+
- run: php ./vendor/bin/codecept build
35+
- name: Start dev server
36+
run: php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
37+
38+
- name: Tests
39+
run: php ./vendor/bin/codecept run --env firefox
40+
41+
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
42+
# Docs: https://getcomposer.org/doc/articles/scripts.md
43+
44+
# - name: Run test suite
45+
# run: composer run-script test

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# WebDriver module for Codeception
22

3-
[![WebDriver Tests](https://github.com/Codeception/module-webdriver/actions/workflows/php.yml/badge.svg)](https://github.com/Codeception/module-webdriver/actions/workflows/php.yml)
3+
[![WebDriver Chrome](https://github.com/Codeception/module-webdriver/actions/workflows/php.yml/badge.svg)](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome.yml) [![WebDriver Firefox](https://github.com/Codeception/module-webdriver/actions/workflows/php.yml/badge.svg)](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-firefox.yml)
4+
45

56
## Installation
67

tests/support/WebGuy.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class WebGuy extends \Codeception\Actor
2020
{
2121
use _generated\WebGuyActions;
2222

23+
use \Codeception\Lib\Actor\Shared\Friend;
2324
/**
2425
* Define custom actions here
2526
*/

0 commit comments

Comments
 (0)