-
-
Notifications
You must be signed in to change notification settings - Fork 48
104 lines (88 loc) · 3.26 KB
/
Copy pathtest-vanilla.yml
File metadata and controls
104 lines (88 loc) · 3.26 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Native E2E Tests - Vanilla
on:
push:
branches:
- master
- next
pull_request:
branches:
- '**'
paths-ignore:
- '**.md'
- '!.github/workflows/ci.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run:
strategy:
fail-fast: false
matrix:
node: [24]
platform:
- ubuntu-latest
name: '${{matrix.platform}} / Node ${{ matrix.node }}'
runs-on: ${{matrix.platform}}
timeout-minutes: 30
if: ${{ !startsWith(github.event.head_commit.message, 'docs:') }}
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install pnpm
uses: pnpm/setup@84cb39b217b10273981911c288cd62326dc7c6d2 # v2
with:
install: false
- name: Set NodeJS
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- run: pnpm --version
- name: Install pnpm dependencies
run: pnpm install
- name: Build Slickgrid-Universal packages
run: pnpm build:universal
- name: Website Dev Build (served for Cypress)
run: pnpm build:dev
- name: Ensure Cypress binary is installed
run: pnpm exec cypress install
- name: Start HTTP Server
run: pnpm vanilla:serve:demo &
- name: Run Cypress E2E tests
uses: cypress-io/github-action@c32f12761482a282d24ca0fd7466d8ae86f54ba8 # v7.4.2
with:
install: false
package-manager-cache: false
# working-directory: packages/dnd
# start: pnpm vanilla:serve:demo
# start: pnpm serve:vite
wait-on: 'http://localhost:8888'
config-file: test/cypress.config.ts
browser: chrome
record: true
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Cypress_extended: true
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: always()
with:
name: cypress-screenshots
path: test/cypress/screenshots
# deploy (re-publish) GitHub demo page with a Prod build but only when merging to "master" branch
# and the commit message contains the text "chore(release)"
- name: Website Prod Build (GitHub demo site)
run: pnpm vanilla:build:demo
if: |
github.ref == 'refs/heads/master' &&
(contains(github.event.head_commit.message, 'chore(release)') || contains(github.event.head_commit.message, '[refresh gh-pages]'))
- name: Deploy to gh-pages
if: |
github.ref == 'refs/heads/master' &&
(contains(github.event.head_commit.message, 'chore(release)') || contains(github.event.head_commit.message, '[refresh gh-pages]'))
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website