-
Notifications
You must be signed in to change notification settings - Fork 7
132 lines (112 loc) · 3.14 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: CI
on:
pull_request:
push:
branches:
- main
- master
schedule:
- cron: "0 3 * * 0" # every Sunday at 3am
env:
CI: true
jobs:
type_checking:
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: Check Types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- run: yarn install --frozen-lockfile
- run: yarn prepack
tests:
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: Base Tests
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
node:
- "16"
- "18"
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
with:
node-version: ${{ matrix.node }}
- run: yarn install --frozen-lockfile
- name: Test with ${{ matrix.node }}
run: yarn ember test
floating-dependencies:
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: Floating Dependencies
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
node:
- "16"
- "18"
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
with:
node-version: ${{ matrix.node }}
- run: yarn install --no-lockfile
- name: Test with Node ${{ matrix.node }}
run: yarn ember test
try-scenarios:
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: "Compatibility"
timeout-minutes: 7
runs-on: ubuntu-latest
needs: [ tests, type_checking ]
strategy:
fail-fast: true
matrix:
ember-try-scenario:
- ember-4.4
- ember-4.8
- ember-release
- ember-beta
- ember-canary
- embroider
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
with:
node-version: 16.x
- name: install dependencies
run: yarn install --frozen-lockfile
- name: test
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup
ember-cli-update:
if: github.event_name == 'pull_request' && github.event.pusher.name == 'renovate-bot'
runs-on: ubuntu-latest
needs: [tests, try-scenarios, floating-dependencies]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GitHubToken }}
- uses: actions/setup-node@v3
- uses: kellyselden/ember-cli-update-action@v3
with:
autofix_command: yarn lint:fix
ignore_to: true
publish:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
needs: [tests, try-scenarios, floating-dependencies]
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: volta-cli/action@v1
- run: yarn install
- name: Release
run: yarn semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}