forked from sveltejs/kit
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (98 loc) · 3.15 KB
/
ci.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
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
name: CI
on:
push:
branches:
- master
pull_request:
env:
CI: true
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Cache ~/.pnpm-store
uses: actions/cache@main
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}
- run: npm install -g pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build --filter ./packages --filter !./packages/create-svelte/templates
- run: pnpm lint
- run: pnpm check
Tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 6
strategy:
fail-fast: false
matrix:
node-version: [14]
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- node-version: 16
os: ubuntu-latest
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get paths for OS
uses: ./.github/actions/env
id: paths
- name: Cache ~/.pnpm-store
id: cache
uses: actions/cache@main
with:
path: ${{ steps.paths.outputs.pnpm_cache_path }}
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}
- name: Cache browsers
id: browser_cache
uses: actions/cache@main
with:
path: ${{ steps.paths.outputs.browser_cache_path }}
key: chromium-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- run: npm install -g pnpm
- run: pnpm install --frozen-lockfile
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: ${{ steps.browser_cache.outputs.cache-hit == 'true' }}
- run: pnpm build --filter ./packages --filter !./packages/create-svelte/templates
- run: pnpm test
Examples:
runs-on: ${{ matrix.os }}
timeout-minutes: 6
strategy:
matrix:
node-version: [14]
os: [ubuntu-latest, macOS-latest, windows-latest]
include:
- node-version: 16
os: ubuntu-latest
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get paths for OS
uses: ./.github/actions/env
id: paths
- name: Cache ~/.pnpm-store
uses: actions/cache@main
with:
path: ${{ steps.paths.outputs.pnpm_cache_path }}
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}
- run: npm install -g pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build && pnpm build --filter="hn.svelte.dev"