mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Check English locale for errors in CI
Moves the most important checks into a linter. It gets executed by Lefthook as well as the docker rake task and Github actions. Doing those checks in rspec takes too long and it produces errors when the discourse:test Docker image contains old, invalid locale files.
This commit is contained in:
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
- master
|
||||
pull_request:
|
||||
branches-ignore:
|
||||
- 'tests-passed'
|
||||
- "tests-passed"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -28,12 +28,12 @@ jobs:
|
||||
fail-fast: false
|
||||
|
||||
matrix:
|
||||
build_types: [ 'BACKEND', 'FRONTEND', 'LINT' ]
|
||||
target: [ 'PLUGINS', 'CORE' ]
|
||||
os: [ ubuntu-latest ]
|
||||
ruby: [ '2.6' ]
|
||||
postgres: [ '10' ]
|
||||
redis: [ '4.x' ]
|
||||
build_types: ["BACKEND", "FRONTEND", "LINT"]
|
||||
target: ["PLUGINS", "CORE"]
|
||||
os: [ubuntu-latest]
|
||||
ruby: ["2.6"]
|
||||
postgres: ["10"]
|
||||
redis: ["4.x"]
|
||||
|
||||
services:
|
||||
postgres:
|
||||
@@ -77,7 +77,7 @@ jobs:
|
||||
uses: actions/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
architecture: 'x64'
|
||||
architecture: "x64"
|
||||
|
||||
- name: Setup bundler
|
||||
run: |
|
||||
@@ -145,6 +145,14 @@ jobs:
|
||||
yarn prettier -v
|
||||
yarn prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.js" "app/assets/javascripts/**/*.es6" "test/javascripts/**/*.es6" "plugins/**/*.scss" "plugins/**/*.es6"
|
||||
|
||||
- name: Core English locale
|
||||
if: env.BUILD_TYPE == 'LINT' && env.TARGET == 'CORE'
|
||||
run: bundle exec ruby script/i18n_lint.rb "config/**/locales/{client,server}.en.yml"
|
||||
|
||||
- name: Plugin English locale
|
||||
if: env.BUILD_TYPE == 'LINT' && env.TARGET == 'PLUGINS'
|
||||
run: bundle exec ruby script/i18n_lint.rb "plugins/**/locales/{client,server}.en.yml"
|
||||
|
||||
- name: Core RSpec
|
||||
if: env.BUILD_TYPE == 'BACKEND' && env.TARGET == 'CORE'
|
||||
run: |
|
||||
@@ -167,5 +175,5 @@ jobs:
|
||||
|
||||
- name: Plugin QUnit # Tests core plugins in TARGET=CORE, and all plugins in TARGET=PLUGINS
|
||||
if: env.BUILD_TYPE == 'FRONTEND'
|
||||
run: bundle exec rake plugin:qunit
|
||||
run: bundle exec rake plugin:qunit['*','1200000']
|
||||
timeout-minutes: 30
|
||||
|
||||
Reference in New Issue
Block a user