forked from sveltejs/kit
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (71 loc) · 2.18 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
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: pnpm/[email protected]
with:
version: 6.23.2
- uses: actions/setup-node@v3
with:
node-version: '14.x'
cache: 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: 20
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: pnpm/[email protected]
with:
version: 6.23.2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Get paths for OS
uses: ./.github/actions/env
id: paths
- 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: 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
- name: archive test results
if: failure()
shell: bash
run: find packages -type d -name test-results -not -empty | tar -czf test-results.tar.gz --exclude='*-retry*' --files-from=-
- name: Upload failed tests screenshots
if: failure()
uses: actions/upload-artifact@v2
with:
retention-days: 3
name: test-failure-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}
path: test-results.tar.gz