File tree 2 files changed +31
-19
lines changed
2 files changed +31
-19
lines changed Original file line number Diff line number Diff line change @@ -29,20 +29,26 @@ jobs:
29
29
run : yarn install
30
30
31
31
- name : ESLint
32
+ if : ${{ always() }}
32
33
run : yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts
33
34
34
35
- name : Prettier
36
+ if : ${{ always() }}
37
+ shell : bash
35
38
run : |
36
39
yarn prettier -v
37
- if [ -d "assets" ]; then \
38
- yarn prettier --list-different "assets/**/*.{scss,js,es6}" ; \
40
+ shopt -s extglob
41
+ if ls assets/**/*.@(scss|js|es6) &> /dev/null; then
42
+ yarn prettier --list-different "assets/**/*.{scss,js,es6}"
39
43
fi
40
- if [ -d " test" ] ; then \
41
- yarn prettier --list-different "test/**/*.{js,es6}" ; \
44
+ if ls test/**/*.@(js|es6) &> /dev/null ; then
45
+ yarn prettier --list-different "test/**/*.{js,es6}"
42
46
fi
43
47
44
48
- name : Ember template lint
49
+ if : ${{ always() }}
45
50
run : yarn ember-template-lint assets/javascripts
46
51
47
52
- name : Rubocop
53
+ if : ${{ always() }}
48
54
run : bundle exec rubocop .
Original file line number Diff line number Diff line change 28
28
matrix :
29
29
build_type : ["backend", "frontend"]
30
30
ruby : ["2.7"]
31
- postgres : ["12 "]
31
+ postgres : ["13 "]
32
32
redis : ["4.x"]
33
33
34
34
services :
58
58
path : plugins/${{ github.event.repository.name }}
59
59
fetch-depth : 1
60
60
61
- - name : Check spec existence
62
- id : check_spec
63
- uses : andstor/file-existence-action@v1
64
- with :
65
- files : " plugins/${{ github.event.repository.name }}/spec"
66
-
67
- - name : Check qunit existence
68
- id : check_qunit
69
- uses : andstor/file-existence-action@v1
70
- with :
71
- files : " plugins/${{ github.event.repository.name }}/test/javascripts"
72
-
73
61
- name : Setup Git
74
62
run : |
75
63
git config --global user.email "ci@ci.invalid"
@@ -121,11 +109,29 @@ jobs:
121
109
bin/rake db:create
122
110
bin/rake db:migrate
123
111
112
+ - name : Check spec existence
113
+ id : check_spec
114
+ shell : bash
115
+ run : |
116
+ shopt -s extglob
117
+ if ls plugins/${{ github.event.repository.name }}/spec/**/*.@(rb) &> /dev/null; then
118
+ echo "::set-output name=files_exist::true"
119
+ fi
120
+
124
121
- name : Plugin RSpec
125
- if : matrix.build_type == 'backend' && steps.check_spec.outputs.files_exists == 'true'
122
+ if : matrix.build_type == 'backend' && steps.check_spec.outputs.files_exist == 'true'
126
123
run : bin/rake plugin:spec[${{ github.event.repository.name }}]
127
124
125
+ - name : Check qunit existence
126
+ id : check_qunit
127
+ shell : bash
128
+ run : |
129
+ shopt -s extglob
130
+ if ls plugins/${{ github.event.repository.name }}/test/javascripts/**/*.@(js|es6) &> /dev/null; then
131
+ echo "::set-output name=files_exist::true"
132
+ fi
133
+
128
134
- name : Plugin QUnit
129
- if : matrix.build_type == 'frontend' && steps.check_qunit.outputs.files_exists == 'true'
135
+ if : matrix.build_type == 'frontend' && steps.check_qunit.outputs.files_exist == 'true'
130
136
run : bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000']
131
137
timeout-minutes : 30
You can’t perform that action at this time.
0 commit comments