Giter Site home page Giter Site logo

testcafe-action-customdr's Introduction

DEPREDCATED

The TestCafe team no longer maintains the testcafe-action repository. If you want to take over the project, we'll be happy to hand it over. To contact the team, create a new GitHub issue or email [email protected].

Run TestCafe GitHub Action

This action installs TestCafe from npm and runs tests.

Usage

- uses: actions/checkout@v1
- uses: DevExpress/testcafe-action@latest
  with:
    args: "chrome tests"

In this example, the checkout action fetches the repository. Then testcafe-action installs the latest TestCafe version and runs tests from the tests folder in Google Chrome.

The args option specifies command line arguments passed to the testcafe command.

You can also use the version option to specify the TestCafe version.

Run the setup-node action before testcafe-action to install a specific Node.js version.

Options

args

TestCafe command line arguments.

- uses: DevExpress/testcafe-action@latest
  with:
    args: "chrome fixture.js -s takeOnFails=true -q -c 3"

version

Optional

The TestCafe version to install.

- uses: DevExpress/testcafe-action@latest
  with:
    version: "1.6.0"
    args: "chrome tests"

Default value: latest

skip-install

Optional

Whether to skip having this action install TestCafe. This is useful if you are managing TestCafe already in your package.json dependencies and want to use that version.

- uses: DevExpress/testcafe-action@latest
  with:
    skip-install: true
    args: "chrome tests"

Default value: false

Examples

This section contains sample workflows that show how to use testcafe-action.

Run TestCafe Tests

The following workflow demonstrates how to use testcafe-action in a basic scenario:

name: Basic TestCafe Workflow
on: [push]

jobs:
  build:
    name: Run TestCafe Tests
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v1
      - name: Install TestCafe from 'npm' and Run Tests
        uses: DevExpress/testcafe-action@latest
        with:
          args: "chrome my-fixture.js"

The checkout action fetches the repository. Then testcafe-action installs TestCafe and runs my-fixture.js in Chrome.

This workflow is triggered when you push changes to the repository. The job runs on a Windows virtual machine.

Target Multiple Node.js Versions and Operating Systems

The following workflow demonstrates how to run TestCafe tests across Node.js versions and operating systems.

name: Target Multiple Node.js Versions and Operating Systems
on: [push]

jobs:
  build:
    name: Run Tests Across Node.js Versions and Operating Systems
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        node: [8, 10, 12]
    steps:
      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}
      - uses: actions/checkout@v1
      - name: Run TestCafe Tests
        uses: DevExpress/testcafe-action@latest
        with:
          args: "chrome tests"

This job contains a matrix strategy that duplicates it to run on Windows and Ubuntu virtual machines in three Node.js versions (8, 10, and 12).

The setup-node action installs the Node.js version defined in the matrix. Then checkout fetches the code and testcafe-action runs tests.

testcafe-action-customdr's People

Contributors

alexkamaev avatar vasilystrelyaev avatar alexskorkin avatar dependabot[bot] avatar nanopx avatar eli88fine avatar jimmed avatar miherlosev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.