Skip to content
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

Update Dependencies and test on Elixir 1.14 and 1.15 #738

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
78 changes: 67 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ jobs:

strategy:
matrix:
elixir-otp: [{otp: 24.x, elixir: 1.12.x}, {otp: 25.x, elixir: 1.13.x}]
elixir-otp:
- otp: 24.x
elixir: 1.12.x
- otp: 25.x
elixir: 1.13.x
- otp: 25.x
elixir: 1.14.x
- otp: 26.x
elixir: 1.15.x
fail-fast: false

env:
Expand Down Expand Up @@ -46,7 +54,15 @@ jobs:

strategy:
matrix:
elixir-otp: [{otp: 24.x, elixir: 1.12.x}, {otp: 25.x, elixir: 1.13.x}]
elixir-otp:
- otp: 24.x
elixir: 1.12.x
- otp: 25.x
elixir: 1.13.x
- otp: 25.x
elixir: 1.14.x
- otp: 26.x
elixir: 1.15.x
fail-fast: false

steps:
Expand Down Expand Up @@ -92,7 +108,15 @@ jobs:

strategy:
matrix:
elixir-otp: [{otp: 24.x, elixir: 1.12.x}, {otp: 25.x, elixir: 1.13.x}]
elixir-otp:
- otp: 24.x
elixir: 1.12.x
- otp: 25.x
elixir: 1.13.x
- otp: 25.x
elixir: 1.14.x
- otp: 26.x
elixir: 1.15.x
fail-fast: false

env:
Expand Down Expand Up @@ -128,7 +152,15 @@ jobs:

strategy:
matrix:
elixir-otp: [{otp: 24.x, elixir: 1.12.x}, {otp: 25.x, elixir: 1.13.x}]
elixir-otp:
- otp: 24.x
elixir: 1.12.x
- otp: 25.x
elixir: 1.13.x
- otp: 25.x
elixir: 1.14.x
- otp: 26.x
elixir: 1.15.x
fail-fast: false

env:
Expand Down Expand Up @@ -177,9 +209,34 @@ jobs:
env:
WALLABY_DRIVER: selenium

services:
selenium-chrome:
image: selenium/standalone-chrome
ports:
- 4444:4444
options: --shm-size=2g
selenium-firefox:
image: selenium/standalone-firefox
ports:
- 4445:4444
options: --shm-size=2g

strategy:
matrix:
elixir-otp: [{otp: 24.x, elixir: 1.13.x}]
elixir-otp:
- otp: 24.x
elixir: 1.12.x
- otp: 25.x
elixir: 1.13.x
- otp: 25.x
elixir: 1.14.x
- otp: 26.x
elixir: 1.15.x
browser:
- name: chrome
port: 4444
- name: firefox
port: 4445
fail-fast: false

steps:
Expand All @@ -202,11 +259,10 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: mix deps.get

- name: Start Selenium
run: java -Djava.awt.headless=true -jar "$SELENIUM_JAR_PATH" standalone > selenium-v4-${{matrix.elixir-otp.elixir}}.log 2>&1 &

- name: Run Tests
- name: Run Tests (${{matrix.browser.name}})
run: mix test || mix test --failed || mix test --failed
env:
SELENIUM_REMOTE_URL: http://selenium-${{matrix.browser.name}}:${{matrix.browser.port}}/

- uses: actions/upload-artifact@v2
if: always()
Expand All @@ -227,7 +283,7 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: brew install erlang elixir
- run: brew install erlang elixir chromedriver selenium-server

- uses: actions/cache@v1
id: cache
Expand All @@ -243,7 +299,7 @@ jobs:
run: mix deps.get

- name: Start Selenium
run: selenium-server standalone > selenium-mac.log 2>&1 &
run: selenium-server standalone -p 4444 > selenium-mac.log 2>&1 &

- name: Run Tests
run: mix test || mix test --failed || mix test --failed
Expand Down
14 changes: 12 additions & 2 deletions integration_test/cases/feature/automatic_screenshot_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ defmodule Wallaby.Integration.Feature.AutomaticScreenshotTest do
end
end

ExUnit.Server.modules_loaded()
if function_exported?(ExUnit.Server, :modules_loaded, 0) do
ExUnit.Server.modules_loaded()
else
ExUnit.Server.modules_loaded(true)
end

configure_and_reload_on_exit(colors: [enabled: false])

output =
Expand Down Expand Up @@ -52,7 +57,12 @@ defmodule Wallaby.Integration.Feature.AutomaticScreenshotTest do
end
end

ExUnit.Server.modules_loaded()
if function_exported?(ExUnit.Server, :modules_loaded, 0) do
ExUnit.Server.modules_loaded()
else
ExUnit.Server.modules_loaded(true)
end

configure_and_reload_on_exit(colors: [enabled: false])

output =
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ defmodule Wallaby.Mixfile do
{:httpoison, "~> 0.12 or ~> 1.0 or ~> 2.0"},
{:web_driver_client, "~> 0.2.0"},
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
{:benchee, "~> 0.9", only: :dev},
{:benchee_html, "~> 0.3", only: :dev},
{:benchee, "~> 1.1", only: :dev},
{:benchee_html, "~> 1.0", only: :dev},
{:credo, "~> 1.6.4", only: [:dev, :test], runtime: false},
{:bypass, "~> 1.0.0", only: :test},
{:ex_doc, "~> 0.28", only: :dev},
Expand Down