-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.17 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
45
46
47
48
49
50
name: Test
on:
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
# Initialize the env variables. These get set after the repo is checked out
# because they depend on files in the repo.
env:
NODE_VERSION: ''
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
- name: Checkout Repo
id: checkout_repo
uses: actions/checkout@v4
# Sets the environment variables from the env.sh script.
- name: Set Environment Variables
id: set_env_vars
run: .github/workflows/scripts/env.sh
# Setup Node.
- name: Setup Node
id: setup_node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
# Installs npm and composer dependencies.
- name: Install
id: install
run: npm ci
# Lint all files.
- name: Lint
id: lint
run: npm run lint
# Runs a test component creation with the `verbose`
# option to true for debugging.
- name: Create Component
id: create_component
run: npm test TestComponent -- -v