Skip to content

Commit

Permalink
Consolidate testing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
carhartl committed Jun 22, 2023
1 parent 5c1f5fc commit 4c461ed
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/browserstack.yml

This file was deleted.

46 changes: 42 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -11,16 +11,54 @@ on:
jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Install dependencies
run: npm i
- name: Unit tests
run: npm test

e2e-test:
runs-on: ubuntu-latest
# Skip pull requests!
if: ${{ ! startsWith(github.event_name, 'pull_request') }}
needs:
- test
steps:
- name: Set up BrowserStack env
# Third-party action, pin to commit SHA!
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions
uses: browserstack/github-actions/setup-env@00ce173eae311a7838f80682a5fad5144c4219ad
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
build-name: BUILD_INFO
project-name: REPO_NAME
- name: Set up BrowserStack local tunnel
# Third-party action, pin to commit SHA!
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions
uses: browserstack/github-actions/setup-local@00ce173eae311a7838f80682a5fad5144c4219ad
with:
local-testing: start
local-identifier: random
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm i
- name: Run BrowserStack E2E tests
run: grunt browserstack
- name: Stop BrowserStackLocal
# Third-party action, pin to commit SHA!
# See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions
uses: browserstack/github-actions/setup-local@00ce173eae311a7838f80682a5fad5144c4219ad
with:
local-testing: stop
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@
<img src="https://cloud.githubusercontent.com/assets/835857/14581711/ba623018-0436-11e6-8fce-d2ccd4d379c9.gif">
</p>

# JavaScript Cookie [![CI](https://github.com/js-cookie/js-cookie/actions/workflows/ci.yml/badge.svg)](https://github.com/js-cookie/js-cookie/actions/workflows/ci.yml) [![BrowserStack](https://github.com/js-cookie/js-cookie/actions/workflows/browserstack.yml/badge.svg)](https://github.com/js-cookie/js-cookie/actions/workflows/browserstack.yml) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![Code Climate](https://codeclimate.com/github/js-cookie/js-cookie.svg)](https://codeclimate.com/github/js-cookie/js-cookie) [![npm](https://img.shields.io/github/package-json/v/js-cookie/js-cookie)](https://www.npmjs.com/package/js-cookie) [![size](https://img.shields.io/bundlephobia/minzip/js-cookie/3)](https://www.npmjs.com/package/js-cookie) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/js-cookie/badge?style=rounded)](https://www.jsdelivr.com/package/npm/js-cookie)
# JavaScript Cookie [![CI](https://github.com/js-cookie/js-cookie/actions/workflows/ci.yml/badge.svg)](https://github.com/js-cookie/js-cookie/actions/workflows/ci.yml) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [![Code Climate](https://codeclimate.com/github/js-cookie/js-cookie.svg)](https://codeclimate.com/github/js-cookie/js-cookie) [![npm](https://img.shields.io/github/package-json/v/js-cookie/js-cookie)](https://www.npmjs.com/package/js-cookie) [![size](https://img.shields.io/bundlephobia/minzip/js-cookie/3)](https://www.npmjs.com/package/js-cookie) [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/js-cookie/badge?style=rounded)](https://www.jsdelivr.com/package/npm/js-cookie)

A simple, lightweight JavaScript API for handling cookies

Expand Down

0 comments on commit 4c461ed

Please sign in to comment.