-
Notifications
You must be signed in to change notification settings - Fork 23
57 lines (54 loc) · 1.91 KB
/
main.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
51
52
53
54
55
56
57
name: CI
on:
push:
branches:
- 'main'
pull_request:
branches:
- '**'
jobs:
build:
name: (stencil-sass with Stencil version ${{ matrix.stencil_version }})
strategy:
fail-fast: false
matrix:
# Run with multiple different versions of Stencil in parallel:
# 1. DEFAULT - uses the version of Stencil written in `package-lock.json`, keeping the same version used by the
# Stencil team as a source of truth
# 2. 2 - will install the latest release under major version 2 of Stencil. This should be kept as long as this
# library supports Stencil v2.Y.Z
# 3. 3 - will install the latest release under major version 3 of Stencil. This should be kept as long as this
# library supports Stencil v3.Y.Z
# 4. 4 - will install the latest release under major version 4 of Stencil. This should be kept as long as this
# library supports Stencil v4.Y.Z
stencil_version: ['DEFAULT', '2', '3', '4']
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
persist-credentials: false
- name: Use Node from Volta
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: 'package.json'
cache: 'npm'
- name: Install Dependencies
run: npm ci
shell: bash
- name: Prettier Check
run: npm run prettier.dry-run
shell: bash
- name: Install Stencil ${{matrix.stencil_version}}
run: npm install --save-dev @stencil/core@${{matrix.stencil_version}}
shell: bash
if: ${{ matrix.stencil_version != 'DEFAULT' }}
- name: Report Stencil Version
run: npm ls @stencil/core
shell: bash
- name: Build
run: npm run build -- --ci
shell: bash
- name: Test
run: npm run test.ci
shell: bash