DEV: Update CI workflows (#20)

DEV: Update CI workflows (#20)

Co-authored-by: davidtaylorhq davidtaylorhq@users.noreply.github.com

diff --git a/.github/workflows/plugin-linting.yml b/.github/workflows/plugin-linting.yml
index 3d7f6d9..51b9b82 100644
--- a/.github/workflows/plugin-linting.yml
+++ b/.github/workflows/plugin-linting.yml
@@ -34,13 +34,15 @@ jobs:
 
       - name: Prettier
         if: ${{ always() }}
+        shell: bash
         run: |
           yarn prettier -v
-          if [ -d "assets" ]; then \
-            yarn prettier --list-different "assets/**/*.{scss,js,es6}" ; \
+          shopt -s extglob
+          if ls assets/**/*.@(scss|js|es6) &> /dev/null; then
+            yarn prettier --list-different "assets/**/*.{scss,js,es6}"
           fi
-          if [ -d "test" ]; then \
-            yarn prettier --list-different "test/**/*.{js,es6}" ; \
+          if ls test/**/*.@(js|es6) &> /dev/null; then
+            yarn prettier --list-different "test/**/*.{js,es6}"
           fi
 
       - name: Ember template lint
diff --git a/.github/workflows/plugin-tests.yml b/.github/workflows/plugin-tests.yml
index ff87d58..b28d0e2 100644
--- a/.github/workflows/plugin-tests.yml
+++ b/.github/workflows/plugin-tests.yml
@@ -26,10 +26,10 @@ jobs:
       fail-fast: false
 
       matrix:
-        build_type: ['backend', 'frontend']
-        ruby: ['2.7']
-        postgres: ['12']
-        redis: ['4.x']
+        build_type: ["backend", "frontend"]
+        ruby: ["2.7"]
+        postgres: ["13"]
+        redis: ["4.x"]
 
     services:
       postgres:
@@ -58,18 +58,6 @@ jobs:
           path: plugins/${{ github.event.repository.name }}
           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
         run: |
           git config --global user.email "ci@ci.invalid"
@@ -121,11 +109,29 @@ jobs:
           bin/rake db:create
           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
-        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 }}]
 
+      - 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
-        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']
         timeout-minutes: 30

GitHub sha: 939066664891eaa477eaea38b8ae7355a7eb253a

This commit appears in #20 which was approved by CvX. It was merged by CvX.