Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Update CI workflows #33

Merged
merged 1 commit into from Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/plugin-linting.yml
Expand Up @@ -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

Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/plugin-tests.yml
Expand Up @@ -29,7 +29,6 @@ jobs:
build_type: ["backend", "frontend"]
ruby: ["2.7"]
postgres: ["13"]
redis: ["4.x"]

services:
postgres:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down