-
Notifications
You must be signed in to change notification settings - Fork 22
89 lines (80 loc) · 2.34 KB
/
dev-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
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
name: Dev
on:
# [prettierx ...]
push:
branches:
# [prettierx ...]
- "@prettier-x/*"
- dev
- dev-*
- prettierx-*
pull_request:
jobs:
test:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
node:
- "16"
- "14"
- "12"
# [prettierx ...]
include:
# [prettierx] code coverage not enabled (...)
- os: "ubuntu-latest"
node: "16"
# [prettierx] NOT ENABLED:
# ENABLE_CODE_COVERAGE: true
FULL_TEST: true
CHECK_TEST_PARSERS: true
exclude:
- os: "macos-latest"
node: "14"
- os: "windows-latest"
node: "14"
env:
ENABLE_CODE_COVERAGE: ${{ matrix.ENABLE_CODE_COVERAGE }}
FULL_TEST: ${{ matrix.FULL_TEST }}
CHECK_TEST_PARSERS: ${{ matrix.CHECK_TEST_PARSERS }}
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/[email protected]
# `codecov/codecov-action` require depth to be at least `2`, see #10219
with:
fetch-depth: 2
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests (macOS)
if: matrix.os == 'macos-latest'
run: yarn test --maxWorkers=4
- name: Run Tests (Linux and Windows)
if: matrix.os != 'macos-latest'
run: yarn test --maxWorkers=2
# [prettierx] code coverage not enabled (see above)
- name: Upload Coverage
uses: codecov/[email protected]
if: matrix.ENABLE_CODE_COVERAGE
with:
fail_ci_if_error: true
# #8073 test
- name: Run Tests (PRETTIER_FALLBACK_RESOLVE)
run: yarn test "tests/integration/__tests__/(config|plugin)"
env:
PRETTIER_FALLBACK_RESOLVE: true
# [prettierx] code coverage not enabled (see above)
- name: Upload Coverage (PRETTIER_FALLBACK_RESOLVE)
uses: codecov/[email protected]
if: matrix.ENABLE_CODE_COVERAGE
with:
fail_ci_if_error: true