-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (42 loc) · 1.31 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
# Reference on this file: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Lint, build and test
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Lint, build and test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
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 the Node.js tools
run: yarn --cwd node build
- name: Test the example project on BrowserStack
run: yarn --cwd example_project test:browserstack --log-level debug
env:
BROWSERSTACK_USERNAME: ${{secrets.BROWSERSTACK_USERNAME}}
BROWSERSTACK_ACCESS_KEY: ${{secrets.BROWSERSTACK_ACCESS_KEY}}
# The following steps will be replaced with automatic publishing
- name: Pack the Node.js tools
run: yarn --cwd node pack
- name: Save the packages
uses: actions/upload-artifact@v4
with:
name: Packages
path: node/*.tgz
if-no-files-found: error