DEV: Update CI workflows (#140)
Co-authored-by: CvX <CvX@users.noreply.github.com>
This commit is contained in:
parent
286b5b5fe7
commit
9b40f41f94
|
@ -37,11 +37,10 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
yarn prettier -v
|
yarn prettier -v
|
||||||
shopt -s extglob
|
if [ 0 -lt $(find assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
||||||
if ls assets/**/*.@(scss|js|es6) &> /dev/null; then
|
|
||||||
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
|
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
|
||||||
fi
|
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}"
|
yarn prettier --list-different "test/**/*.{js,es6}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ jobs:
|
||||||
build_type: ["backend", "frontend"]
|
build_type: ["backend", "frontend"]
|
||||||
ruby: ["2.7"]
|
ruby: ["2.7"]
|
||||||
postgres: ["13"]
|
postgres: ["13"]
|
||||||
redis: ["4.x"]
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
@ -63,10 +62,9 @@ jobs:
|
||||||
git config --global user.email "ci@ci.invalid"
|
git config --global user.email "ci@ci.invalid"
|
||||||
git config --global user.name "Discourse CI"
|
git config --global user.name "Discourse CI"
|
||||||
|
|
||||||
- name: Setup redis
|
- name: Start redis
|
||||||
uses: shogo82148/actions-setup-redis@v1
|
run: |
|
||||||
with:
|
redis-server /etc/redis/redis.conf &
|
||||||
redis-version: ${{ matrix.redis }}
|
|
||||||
|
|
||||||
- name: Bundler cache
|
- name: Bundler cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
|
@ -113,8 +111,7 @@ jobs:
|
||||||
id: check_spec
|
id: check_spec
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
shopt -s extglob
|
if [ 0 -lt $(find plugins/${{ github.event.repository.name }}/spec -type f -name "*.rb" 2> /dev/null | wc -l) ]; then
|
||||||
if ls plugins/${{ github.event.repository.name }}/spec/**/*.@(rb) &> /dev/null; then
|
|
||||||
echo "::set-output name=files_exist::true"
|
echo "::set-output name=files_exist::true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -126,8 +123,7 @@ jobs:
|
||||||
id: check_qunit
|
id: check_qunit
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
shopt -s extglob
|
if [ 0 -lt $(find plugins/${{ github.event.repository.name }}/test/javascripts -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
||||||
if ls plugins/${{ github.event.repository.name }}/test/javascripts/**/*.@(js|es6) &> /dev/null; then
|
|
||||||
echo "::set-output name=files_exist::true"
|
echo "::set-output name=files_exist::true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue