-
Notifications
You must be signed in to change notification settings - Fork 29
52 lines (43 loc) · 1.3 KB
/
e2e.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
name: CI
on:
- pull_request
- workflow_dispatch
# Pushing new commits to the same branch
# will cancel any previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
get-node-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Node Version
id: get-node-version
# All of this is to get the node version from package.json
# and remove the leading and trailing quotes, otherwise it
# breaks the github action that consumes this data
run: echo node-version=$(cat package.json | jq ".engines.node" | sed 's/^"\(.*\)"$/\1/') >> $GITHUB_OUTPUT
outputs:
node-version: ${{ steps.get-node-version.outputs.node-version }}
e2e:
needs:
- get-node-version
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ needs.get-node-version.outputs.node-version }}
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Run E2E Tests
run: npm run e2e