DEV: Update CI workflows
This commit is contained in:
parent
97adee3680
commit
0f2475708e
|
@ -20,13 +20,10 @@ jobs:
|
||||||
node-version: 12
|
node-version: 12
|
||||||
|
|
||||||
- name: Set up ruby
|
- name: Set up ruby
|
||||||
uses: actions/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.7
|
ruby-version: 2.7
|
||||||
|
|
||||||
- name: Setup bundler
|
|
||||||
run: gem install bundler -v 2.1.4 --no-doc
|
|
||||||
|
|
||||||
- name: Setup gems
|
- name: Setup gems
|
||||||
run: bundle install --jobs 4
|
run: bundle install --jobs 4
|
||||||
|
|
||||||
|
@ -46,5 +43,8 @@ jobs:
|
||||||
yarn prettier --list-different "test/**/*.{js,es6}" ; \
|
yarn prettier --list-different "test/**/*.{js,es6}" ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Ember template lint
|
||||||
|
run: yarn ember-template-lint assets/javascripts
|
||||||
|
|
||||||
- name: Rubocop
|
- name: Rubocop
|
||||||
run: bundle exec rubocop .
|
run: bundle exec rubocop .
|
||||||
|
|
|
@ -10,7 +10,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.build_type }}
|
name: ${{ matrix.build_type }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
@ -26,8 +26,7 @@ jobs:
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
build_type: ["backend", "frontend"]
|
build_type: ["backend", "frontend"]
|
||||||
os: [ubuntu-latest]
|
ruby: ["2.7"]
|
||||||
ruby: ["2.6"]
|
|
||||||
postgres: ["12"]
|
postgres: ["12"]
|
||||||
redis: ["4.x"]
|
redis: ["4.x"]
|
||||||
|
|
||||||
|
@ -47,13 +46,13 @@ jobs:
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: discourse/discourse
|
repository: discourse/discourse
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Install plugin
|
- name: Install plugin
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: plugins/${{ github.event.repository.name }}
|
path: plugins/${{ github.event.repository.name }}
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
@ -94,27 +93,14 @@ jobs:
|
||||||
redis-version: ${{ matrix.redis }}
|
redis-version: ${{ matrix.redis }}
|
||||||
|
|
||||||
- name: Setup ruby
|
- name: Setup ruby
|
||||||
uses: actions/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Setup bundler
|
- name: Lint English locale
|
||||||
run: |
|
if: matrix.build_type == 'backend'
|
||||||
gem install bundler -v 2.1.4 --no-doc
|
run: bundle exec ruby script/i18n_lint.rb "plugins/${{ github.event.repository.name }}/locales/{client,server}.en.yml"
|
||||||
bundle config deployment 'true'
|
|
||||||
bundle config without 'development'
|
|
||||||
|
|
||||||
- name: Bundler cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
id: bundler-cache
|
|
||||||
with:
|
|
||||||
path: vendor/bundle
|
|
||||||
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gem-
|
|
||||||
|
|
||||||
- name: Setup gems
|
|
||||||
run: bundle install --jobs 4
|
|
||||||
|
|
||||||
- name: Get yarn cache directory
|
- name: Get yarn cache directory
|
||||||
id: yarn-cache-dir
|
id: yarn-cache-dir
|
||||||
|
|
Loading…
Reference in New Issue