-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add initial ci set-up * Fix gemfiles * add spec * fix spec_helper * Lint
- Loading branch information
Showing
16 changed files
with
2,133 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: "[CI] Lint" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
RUBY_VERSION: 2.7.5 | ||
NODE_VERSION: 16.9.1 | ||
BUNDLE_GEMFILE: gemfiles/decidim_0.26.gemfile | ||
|
||
jobs: | ||
lint-report: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@master | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
|
||
- run: bundle exec rubocop -P | ||
name: Lint Ruby files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: "[CI] I18n test" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
NODE_VERSION: 16.9.1 | ||
|
||
jobs: | ||
test-report: | ||
runs-on: ubuntu-20.04 | ||
|
||
services: | ||
postgres: | ||
image: postgres:11 | ||
ports: ["5432:5432"] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
env: | ||
DATABASE_USERNAME: postgres | ||
DATABASE_PASSWORD: postgres | ||
DATABASE_HOST: localhost | ||
BUNDLE_GEMFILE: gemfiles/decidim_0.26.gemfile | ||
RUBY_VERSION: 2.7.5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
|
||
- name: Setup Database | ||
run: bundle exec rake test_app | ||
|
||
- name: Run RSpec | ||
run: bundle exec rspec spec/i18n_spec.rb | ||
env: | ||
SIMPLECOV: 0 | ||
CODECOV: 0 | ||
|
||
- uses: actions/upload-artifact@v2-preview | ||
if: always() | ||
with: | ||
name: screenshots | ||
path: ./spec/decidim_dummy_app/tmp/screenshots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: "[CI] Test" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
NODE_VERSION: 16.9.1 | ||
|
||
jobs: | ||
test-report: | ||
runs-on: ubuntu-20.04 | ||
|
||
services: | ||
postgres: | ||
image: postgres:11 | ||
ports: ["5432:5432"] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
env: | ||
DATABASE_USERNAME: postgres | ||
DATABASE_PASSWORD: postgres | ||
DATABASE_HOST: localhost | ||
BUNDLE_GEMFILE: ${{ matrix.gemfile }} | ||
RUBY_VERSION: ${{ matrix.ruby }} | ||
|
||
strategy: | ||
matrix: | ||
gemfile: | ||
- gemfiles/decidim_0.26.gemfile | ||
- gemfiles/decidim_0.27.gemfile | ||
ruby: | ||
- 2.7.5 | ||
- 3.0.2 | ||
exclude: | ||
- gemfile: gemfiles/decidim_0.26.gemfile | ||
ruby: 3.0.2 | ||
- gemfile: gemfiles/decidim_0.27.gemfile | ||
ruby: 2.7.5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- name: Setup Database | ||
run: bundle exec rake test_app | ||
|
||
- name: Run RSpec | ||
run: bundle exec rspec --exclude-pattern "spec/i18n_spec.rb" | ||
env: | ||
SIMPLECOV: 1 | ||
CODECOV: 1 | ||
|
||
- uses: actions/upload-artifact@v2-preview | ||
if: always() | ||
with: | ||
name: screenshots | ||
path: ./spec/decidim_dummy_app/tmp/screenshots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--format documentation | ||
--color | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
inherit_from: | ||
- .rubocop_ruby.yml | ||
- .rubocop_rails.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
require: rubocop-rails | ||
|
||
Rails: | ||
Enabled: true | ||
|
||
Rails/ActionFilter: | ||
Include: | ||
- app/controllers/**/*.rb | ||
|
||
Rails/ContentTag: | ||
Enabled: false | ||
|
||
Rails/CreateTableWithTimestamps: | ||
Enabled: false | ||
|
||
Rails/EnumUniqueness: | ||
Include: | ||
- app/models/**/*.rb | ||
|
||
Rails/Exit: | ||
Include: | ||
- app/**/*.rb | ||
- config/**/*.rb | ||
- lib/**/*.rb | ||
Exclude: | ||
- lib/**/*.rake | ||
|
||
Rails/FindBy: | ||
Include: | ||
- "**/*.rb" | ||
|
||
Rails/FindEach: | ||
Include: | ||
- app/models/**/*.rb | ||
|
||
Rails/HasAndBelongsToMany: | ||
Include: | ||
- app/models/**/*.rb | ||
|
||
Rails/HasManyOrHasOneDependent: | ||
Include: | ||
- app/models/**/*.rb | ||
|
||
Rails/InverseOf: | ||
Enabled: false | ||
|
||
Rails/LexicallyScopedActionFilter: | ||
Include: | ||
- app/controllers/**/*.rb | ||
|
||
Rails/NotNullColumn: | ||
Enabled: false | ||
|
||
Rails/Output: | ||
Include: | ||
- app/**/*.rb | ||
- config/**/*.rb | ||
- db/**/*.rb | ||
- lib/**/*.rb | ||
Exclude: | ||
- db/seeds.rb | ||
Rails/OutputSafety: | ||
Enabled: false | ||
|
||
Rails/Pluck: | ||
Enabled: false | ||
|
||
Rails/RakeEnvironment: | ||
Enabled: false | ||
|
||
Rails/ReadWriteAttribute: | ||
Include: | ||
- app/models/**/*.rb | ||
|
||
Rails/ReversibleMigration: | ||
Enabled: false | ||
|
||
Rails/ScopeArgs: | ||
Include: | ||
- app/models/**/*.rb | ||
|
||
Rails/SkipsModelValidations: | ||
Enabled: true | ||
|
||
Rails/Validation: | ||
Include: | ||
- app/models/**/*.rb |
Oops, something went wrong.