Skip to content

Add BrowserContext clock helpers #125

Add BrowserContext clock helpers

Add BrowserContext clock helpers #125

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Elixir CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
env:
MIX_ENV: test
PW_TIMEOUT: 4000
jobs:
build:
name: Build and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup languages
uses: jdx/mise-action@v2
- name: Install dependencies
run: mix do deps.get, deps.compile
- name: Check Formatting
run: mix format --check-formatted
- name: Check Credo
run: mix credo
- name: Compiles without warnings
run: mix compile --warnings-as-errors
- name: Restore Dialyzer PLT cache
id: plt_cache
uses: actions/cache/restore@v4
with:
key: plt-${{ runner.os }}-${{ hashFiles('.tool-versions') }}-${{ hashFiles('**/mix.lock') }}
restore-keys: plt-${{ runner.os }}-${{ hashFiles('.tool-versions') }}
path: priv/plts
- name: Create PLTs
if: steps.plt_cache.outputs.cache-hit != 'true'
run: mix dialyzer --plt
- name: Save PLT cache
id: plt_cache_save
uses: actions/cache/save@v4
if: steps.plt_cache.outputs.cache-hit != 'true'
with:
key: plt-${{ runner.os }}-${{ hashFiles('.tool-versions') }}-${{ hashFiles('**/mix.lock') }}
path: priv/plts
- name: Run Dialyzer
run: mix dialyzer --format github --format dialyxir
test:
name: Test (${{ matrix.transport }})
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
transport: [port, websocket]
include:
- transport: port
mix_task: test
- transport: websocket
mix_task: test.websocket
steps:
- uses: actions/checkout@v4
- name: Setup languages
uses: jdx/mise-action@v2
- name: Install dependencies
run: mix do deps.get, deps.compile
- name: Install JS dependencies and browsers
if: matrix.transport == 'port'
run: mix setup
- name: Run tests
run: mix ${{ matrix.mix_task }} --warnings-as-errors