This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
96 lines (88 loc) · 2.7 KB
/
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
90
91
92
93
94
95
96
name: Test Suite
on:
pull_request:
push:
branches:
- "v4.*"
- "5.0"
- "multiple-newsletters"
- main
- "renovate/*"
jobs:
prod-build:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
name: Production Build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14.17.0"
- run: yarn
- run: grunt shell:ember:prod
- uses: daniellockyer/action-slack-build@master
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
lint:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
name: Lint
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14.17.0"
- run: yarn
- run: yarn lint:js
- run: yarn lint:hbs
- uses: daniellockyer/action-slack-build@master
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
test:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
strategy:
matrix:
browser: ["Firefox", "Chrome"]
name: ${{ matrix.browser }}
env:
MOZ_HEADLESS: 1
JOBS: 1
CI: true
COVERAGE: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14.17.0"
- run: yarn
- run: yarn test
env:
BROWSER: ${{ matrix.browser }}
# Merge coverage reports and upload
- run: yarn ember coverage-merge
- uses: codecov/codecov-action@v3
- uses: daniellockyer/action-slack-build@master
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
canary:
runs-on: ubuntu-18.04
needs: [lint, test, prod-build]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Canary
steps:
- name: Invoke Canary Build
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Canary Build
repo: TryGhost/Ghost
token: ${{ secrets.WORKFLOW_TOKEN }}