-
Notifications
You must be signed in to change notification settings - Fork 224
102 lines (96 loc) · 3.09 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
101
102
name: Tests
on:
[push, workflow_dispatch]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --immutable --network-timeout 1000000
- name: unit tests
run: yarn test
- name: linting
run: yarn lint
integration:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
os: [ubuntu-latest]
environment: AcceptanceTests
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
ENABLE_NET_CONNECT: true
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --immutable --network-timeout 1500000
- name: Run cli package integration tests
run: |
cd packages/cli
yarn test:integration
acceptance:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
os: [ubuntu-latest]
environment: AcceptanceTests
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
ENABLE_NET_CONNECT: true
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --immutable --network-timeout 1000000
# on 'main' and 'release-' branches, these tests will be run as part of the acceptance tests.
- name: run smoke tests
if: github.ref_name != 'main' || !startsWith(github.ref_name, 'release-')
run: cd packages/cli && yarn test:smoke
# only run the full suite of acceptance tests on 'main' and 'release-' branches
- name: run acceptance tests
if: github.ref_name == 'main' || startsWith(github.ref_name, 'release-')
run: cd packages/cli && yarn test:acceptance
spell-check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn add cspell@7.3.9
- name: Run spell check on changed files
run: |
git fetch origin main:refs/remotes/origin/main --quiet
git diff origin/main...HEAD --diff-filter=d --name-only | yarn run cspell --no-progress --gitignore --no-must-find-files --file-list stdin
# dummy job needed to pass changeling compliance because it only watches one build
done:
runs-on: macos-latest
needs: [test, integration, acceptance]
steps:
- run: echo done
working-directory: /