DEV: Update CI workflows (#90)

Co-authored-by: CvX <CvX@users.noreply.github.com>
This commit is contained in:
discoursebot 2021-09-15 13:54:13 -04:00 committed by GitHub
parent 6e96f07378
commit 6052366472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 12 deletions

View File

@ -37,11 +37,10 @@ jobs:
shell: bash
run: |
yarn prettier -v
shopt -s extglob
if ls assets/**/*.@(scss|js|es6) &> /dev/null; then
if [ 0 -lt $(find assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
fi
if ls test/**/*.@(js|es6) &> /dev/null; then
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
yarn prettier --list-different "test/**/*.{js,es6}"
fi

View File

@ -29,7 +29,6 @@ jobs:
build_type: ["backend", "frontend"]
ruby: ["2.7"]
postgres: ["13"]
redis: ["4.x"]
services:
postgres:
@ -63,10 +62,9 @@ jobs:
git config --global user.email "ci@ci.invalid"
git config --global user.name "Discourse CI"
- name: Setup redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis }}
- name: Start redis
run: |
redis-server /etc/redis/redis.conf &
- name: Bundler cache
uses: actions/cache@v2
@ -113,8 +111,7 @@ jobs:
id: check_spec
shell: bash
run: |
shopt -s extglob
if ls plugins/${{ github.event.repository.name }}/spec/**/*.@(rb) &> /dev/null; then
if [ 0 -lt $(find plugins/${{ github.event.repository.name }}/spec -type f -name "*.rb" 2> /dev/null | wc -l) ]; then
echo "::set-output name=files_exist::true"
fi
@ -126,8 +123,7 @@ jobs:
id: check_qunit
shell: bash
run: |
shopt -s extglob
if ls plugins/${{ github.event.repository.name }}/test/javascripts/**/*.@(js|es6) &> /dev/null; then
if [ 0 -lt $(find plugins/${{ github.event.repository.name }}/test/javascripts -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
echo "::set-output name=files_exist::true"
fi