forked from fingerprintjs/fingerprintjs
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.63 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Reference on this file: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# You need to add BrowserStack access keys in order for the tests to work. Get a BrowserStack automate account, then go
# to the repository settings, the Secrets page and add secrets: BROWSERSTACK_USERNAME, BROWSERSTACK_ACCESS_KEY.
name: Lint and test
on:
push:
branches:
- master
pull_request:
paths-ignore:
- '**.md'
- playground/**
jobs:
test:
name: Lint and test
runs-on: ubuntu-latest
timeout-minutes: 15
concurrency: browserstack
steps:
# TypeScript types are checked during building and testing so there is no need for a separate step for the check
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: node_modules
key: nodemodules-${{ hashFiles('yarn.lock') }}
restore-keys: nodemodules-
- name: Install Node packages
run: yarn install
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Check the distributive TypeScript declarations
run: yarn check:dts
# Helps to prevent https://github.com/fingerprintjs/fingerprintjs/issues/602
- name: Check the ability to work with server side rendering
run: yarn check:ssr
- name: Test on BrowserStack
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
run: yarn test:browserstack --log-level ${{ runner.debug == '1' && 'debug' || 'info' }}