103 lines (88 loc) Β· 2.74 KB
/
integration-workflow.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
101
102
103
on:
push:
branches:
- master
pull_request:
name: 'Integration'
jobs:
chore:
name: 'Testing chores'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Use Node.js 10.x'
uses: actions/setup-node@master
with:
node-version: 10.x
- name: 'Check that the Yarn files don''t change on new installs (fix w/ "yarn install")'
run: |
node ./scripts/run-yarn.js --immutable --immutable-cache
shell: bash
env:
YARN_ENABLE_NETWORK: 0
- name: 'Check that the cache files are consistent with their remote sources'
run: |
if [[ $(git diff --name-only "$(git merge-base origin/"$TARGET_BRANCH" HEAD)" HEAD -- .yarn/{cache,virtual} | wc -l) -gt 0 ]]; then
node ./scripts/run-yarn.js --immutable --immutable-cache --check-cache
fi
shell: bash
if: |
github.event.pull_request != ''
env:
TARGET_BRANCH: ${{github.event.pull_request.base.ref}}
- name: 'Check that the PR describes which packages should be bumped (fix w/ "yarn version check -i")'
run: |
node ./scripts/run-yarn.js version check
shell: bash
if: |
github.event.pull_request != ''
- name: 'Check for linting errors (fix w/ "yarn test:lint --fix")'
run: |
node ./scripts/run-yarn.js test:lint
shell: bash
- name: 'Check for unmet constraints (fix w/ "yarn constraints --fix")'
run: |
node ./scripts/run-yarn.js constraints
shell: bash
acceptance:
strategy:
fail-fast: false
matrix:
node:
- 8
- 10
- 12
- 13
platform:
- ubuntu-latest
- windows-latest
- macos-latest
exclude:
- node: 8
platform: windows-latest
name: '${{matrix.platform}} w/ Node.js ${{matrix.node}}.x'
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@master
- name: 'Use Node.js ${{matrix.node}}.x'
uses: actions/setup-node@master
with:
node-version: ${{matrix.node}}.x
- name: 'Build the standard bundle & plugins'
run: |
node --version
node ./scripts/run-yarn.js build:cli
node ./scripts/run-yarn.js build:plugin-exec
node ./scripts/run-yarn.js build:plugin-stage
node ./scripts/run-yarn.js build:plugin-typescript
node ./scripts/run-yarn.js build:plugin-version
node ./scripts/run-yarn.js build:plugin-workspace-tools
shell: bash
- name: 'Run the integration tests'
run: |
node ./scripts/run-yarn.js test:integration --runInBand
shell: bash
- name: 'Run the unit tests'
run: |
node ./scripts/run-yarn.js test:unit
shell: bash