-
Notifications
You must be signed in to change notification settings - Fork 2
159 lines (141 loc) · 4.63 KB
/
pull_request.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: Pipeline
on:
- pull_request
concurrency:
group: pull-request-${{ github.ref }}
cancel-in-progress: true
jobs:
# DOCKER
build:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Test
image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
cypress:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Cypress
target: cypress
image: "gmmcal/gmmcal:cypress-${{ github.event.number }}-${{ github.run_number }}"
preview:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Preview
target: staging
image: "gmmcal/gmmcal:preview-${{ github.event.number }}-${{ github.run_number }}"
publish: true
development:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Development
target: development
publish: false
image: gmmcal/gmmcal:development
production:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Production
target: production
publish: false
image: gmmcal/gmmcal:production
# LINT
rubocop:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: Rubocop
image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
command: bin/rubocop
needs: build
reek:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: Reek
image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
command: bundle exec reek --config .reek.yml .
needs: build
brakeman:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: Brakeman
image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
command: bin/brakeman
needs: build
scsslint:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: SCSSLint
image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
command: bundle exec scss-lint --config .scss-lint.yml
needs: build
bundler-audit:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: Bundler Audit
image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
command: bundle exec bundle-audit check --update
needs: build
eslint:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: ESLint
image: "gmmcal/gmmcal:cypress-${{ github.event.number }}-${{ github.run_number }}"
command: yarn eslint
needs: cypress
eslint_tests:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: ESLint - Tests
image: "gmmcal/gmmcal:cypress-${{ github.event.number }}-${{ github.run_number }}"
command: yarn eslint:tests
needs: cypress
# TESTS
tests:
name: Tests
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_tests.yml@v0
with:
image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
command: bundle exec rspec
needs: build
e2e-admin:
name: Tests
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_cypress.yml@v0
with:
image: "gmmcal/gmmcal:cypress-${{ github.event.number }}-${{ github.run_number }}"
application-image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
pattern: spec/end-to-end/tests/admin/**.js
name: Admin
needs: [build, cypress]
e2e-frontend:
name: Tests
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_cypress.yml@v0
with:
image: "gmmcal/gmmcal:cypress-${{ github.event.number }}-${{ github.run_number }}"
application-image: "gmmcal/gmmcal:test-${{ github.event.number }}-${{ github.run_number }}"
pattern: spec/end-to-end/tests/frontend/**.js
name: Frontend
needs: [build, cypress]
# Preview and Cleanup
deploy:
name: Preview
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_preview.yml@v0
needs: preview
secrets: inherit
with:
image: "gmmcal/gmmcal:preview-${{ github.event.number }}-${{ github.run_number }}"