DEV: Update CI workflows (#81)
Co-authored-by: davidtaylorhq <davidtaylorhq@users.noreply.github.com>
This commit is contained in:
parent
07f0ea5463
commit
c0bd802f78
|
@ -29,20 +29,26 @@ jobs:
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
- name: ESLint
|
- name: ESLint
|
||||||
|
if: ${{ always() }}
|
||||||
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts
|
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,assets}/javascripts
|
||||||
|
|
||||||
- name: Prettier
|
- name: Prettier
|
||||||
|
if: ${{ always() }}
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
yarn prettier -v
|
yarn prettier -v
|
||||||
if [ -d "assets" ]; then \
|
shopt -s extglob
|
||||||
yarn prettier --list-different "assets/**/*.{scss,js,es6}" ; \
|
if ls assets/**/*.@(scss|js|es6) &> /dev/null; then
|
||||||
|
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
|
||||||
fi
|
fi
|
||||||
if [ -d "test" ]; then \
|
if ls test/**/*.@(js|es6) &> /dev/null; then
|
||||||
yarn prettier --list-different "test/**/*.{js,es6}" ; \
|
yarn prettier --list-different "test/**/*.{js,es6}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Ember template lint
|
- name: Ember template lint
|
||||||
|
if: ${{ always() }}
|
||||||
run: yarn ember-template-lint assets/javascripts
|
run: yarn ember-template-lint assets/javascripts
|
||||||
|
|
||||||
- name: Rubocop
|
- name: Rubocop
|
||||||
|
if: ${{ always() }}
|
||||||
run: bundle exec rubocop .
|
run: bundle exec rubocop .
|
||||||
|
|
|
@ -28,7 +28,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: ["backend", "frontend"]
|
build_type: ["backend", "frontend"]
|
||||||
ruby: ["2.7"]
|
ruby: ["2.7"]
|
||||||
postgres: ["12"]
|
postgres: ["13"]
|
||||||
redis: ["4.x"]
|
redis: ["4.x"]
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -58,18 +58,6 @@ jobs:
|
||||||
path: plugins/${{ github.event.repository.name }}
|
path: plugins/${{ github.event.repository.name }}
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Check spec existence
|
|
||||||
id: check_spec
|
|
||||||
uses: andstor/file-existence-action@v1
|
|
||||||
with:
|
|
||||||
files: "plugins/${{ github.event.repository.name }}/spec"
|
|
||||||
|
|
||||||
- name: Check qunit existence
|
|
||||||
id: check_qunit
|
|
||||||
uses: andstor/file-existence-action@v1
|
|
||||||
with:
|
|
||||||
files: "plugins/${{ github.event.repository.name }}/test/javascripts"
|
|
||||||
|
|
||||||
- name: Setup Git
|
- name: Setup Git
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "ci@ci.invalid"
|
git config --global user.email "ci@ci.invalid"
|
||||||
|
@ -121,11 +109,29 @@ jobs:
|
||||||
bin/rake db:create
|
bin/rake db:create
|
||||||
bin/rake db:migrate
|
bin/rake db:migrate
|
||||||
|
|
||||||
|
- name: Check spec existence
|
||||||
|
id: check_spec
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
shopt -s extglob
|
||||||
|
if ls plugins/${{ github.event.repository.name }}/spec/**/*.@(rb) &> /dev/null; then
|
||||||
|
echo "::set-output name=files_exist::true"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Plugin RSpec
|
- name: Plugin RSpec
|
||||||
if: matrix.build_type == 'backend' && steps.check_spec.outputs.files_exists == 'true'
|
if: matrix.build_type == 'backend' && steps.check_spec.outputs.files_exist == 'true'
|
||||||
run: bin/rake plugin:spec[${{ github.event.repository.name }}]
|
run: bin/rake plugin:spec[${{ github.event.repository.name }}]
|
||||||
|
|
||||||
|
- name: Check qunit existence
|
||||||
|
id: check_qunit
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
shopt -s extglob
|
||||||
|
if ls plugins/${{ github.event.repository.name }}/test/javascripts/**/*.@(js|es6) &> /dev/null; then
|
||||||
|
echo "::set-output name=files_exist::true"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Plugin QUnit
|
- name: Plugin QUnit
|
||||||
if: matrix.build_type == 'frontend' && steps.check_qunit.outputs.files_exists == 'true'
|
if: matrix.build_type == 'frontend' && steps.check_qunit.outputs.files_exist == 'true'
|
||||||
run: bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000']
|
run: bundle exec rake plugin:qunit['${{ github.event.repository.name }}','1200000']
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
Loading…
Reference in New Issue