-
Notifications
You must be signed in to change notification settings - Fork 29
64 lines (53 loc) · 1.5 KB
/
Javascript-Tests.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Run javascript unit and playwright tests
name: Javascript Tests
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
concurrency:
group: ci-tests-${{ github.ref }}-1
cancel-in-progress: true
jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest
env:
CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts
CI_COMMIT_AUTHOR: Continuous Integration
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Build
run: yarn build
- name: Test
run: yarn test
# Setup R so we can test R backend in playwright tests
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, any::devtools, local::.
needs: website
- name: Install Playwright Browsers
working-directory: ./inst/editor
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ./inst/editor
run: yarn playwright
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: ./inst/editor/playwright-report/