Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tonytech83/execute-test

Simple custom GitHub action for execution of Unit and UI tests.
https://github.com/tonytech83/execute-test

github-actions yml

Last synced: about 2 months ago
JSON representation

Simple custom GitHub action for execution of Unit and UI tests.

Awesome Lists containing this project

README

        

# Test action
This simple action for execution of `npm` tests with color output.

## Input
### `test-name`
**Required** - The name of the test from `package.json`.

## Example usege
```yml
---
name: Test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"

- name: Install dependencies
run: npm install

- name: Install Playwright browsers
run: npx playwright install

- name: Start the application
run: npm start &

- name: Execute UI tests
uses: tonytech83/[email protected]
with:
test-name: test:ui
```