-
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.
- Loading branch information
Showing
104 changed files
with
17,105 additions
and
17,049 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
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,42 @@ | ||
name: Docker | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
title: | ||
required: true | ||
type: string | ||
command: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
docker: | ||
name: 'Docker: Build' | ||
runs-on: ubuntu-20.04 | ||
|
||
services: | ||
postgres: | ||
image: postgres:16 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: gmmcalcombr_test | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build test image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: false | ||
context: . | ||
target: test | ||
tags: "gmmcal:test" | ||
|
||
- name: Run rubocop | ||
run: | | ||
docker run --network=${{ job.services.postgres.network }} -e DATABASE_URL='postgres://postgres:postgres@postgres:5432/gmmcalcombr_test' -e DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true --rm gmmcal:test ${{inputs.command}} |
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 |
---|---|---|
|
@@ -6,122 +6,62 @@ on: | |
jobs: | ||
rubocop: | ||
name: 'Lint: Rubocop' | ||
runs-on: ubuntu-20.04 | ||
|
||
container: | ||
image: ruby:3.2.2 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-gmmcal-${{ hashFiles('/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems-gmmcal- | ||
- name: Run bundle install | ||
run: | | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: Run rubocop | ||
run: bundle exec rubocop --config .rubocop.yml . | ||
uses: gmmcal/gmmcal.com.br/.github/workflows/docker.yml@actions | ||
with: | ||
title: Run rubocop | ||
command: bundle exec rubocop --config .rubocop.yml . | ||
|
||
reek: | ||
name: 'Lint: Reek' | ||
runs-on: ubuntu-20.04 | ||
|
||
container: | ||
image: ruby:3.2.2 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-gmmcal-${{ hashFiles('/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems-gmmcal- | ||
- name: Run bundle install | ||
run: | | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: Run reek | ||
run: bundle exec reek --config .reek.yml . | ||
|
||
brakeman: | ||
name: 'Lint: Brakeman' | ||
runs-on: ubuntu-20.04 | ||
|
||
container: | ||
image: ruby:3.2.2 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-gmmcal-${{ hashFiles('/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems-gmmcal- | ||
- name: Run bundle install | ||
run: | | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: Run brakeman | ||
run: bundle exec brakeman | ||
|
||
bundler-audit: | ||
name: 'Lint: Bundler Audit' | ||
runs-on: ubuntu-20.04 | ||
|
||
container: | ||
image: ruby:3.2.2 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Bundler Audit | ||
run: gem install bundler-audit | ||
|
||
- name: Update advisory database | ||
run: bundler-audit update | ||
|
||
- name: Run bundler-audit | ||
run: bundler-audit | ||
|
||
scsslint: | ||
name: 'Lint: SCSSLint' | ||
runs-on: ubuntu-20.04 | ||
|
||
container: | ||
image: ruby:3.2.2 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-gmmcal-${{ hashFiles('/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems-gmmcal- | ||
- name: Run bundle install | ||
run: | | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: Run SCSSLint | ||
run: bundle exec scss-lint --config .scss-lint.yml | ||
uses: gmmcal/gmmcal.com.br/.github/workflows/docker.yml@actions | ||
with: | ||
title: Run rubocop | ||
command: bundle exec reek --config .reek.yml . | ||
|
||
# brakeman: | ||
# name: 'Lint: Brakeman' | ||
# runs-on: ubuntu-20.04 | ||
# needs: build | ||
|
||
# steps: | ||
# - name: Download an image | ||
# uses: ishworkh/[email protected] | ||
# with: | ||
# image: "gmmcal:test" | ||
|
||
# - name: Run brakeman | ||
# run: | | ||
# docker run --rm gmmcal:test bundle exec brakeman | ||
|
||
# bundler-audit: | ||
# name: 'Lint: Bundler Audit' | ||
# runs-on: ubuntu-20.04 | ||
# needs: build | ||
|
||
# steps: | ||
# - name: Download an image | ||
# uses: ishworkh/[email protected] | ||
# with: | ||
# image: "gmmcal:test" | ||
|
||
# - name: Run bundler-audit | ||
# run: | | ||
# docker run --rm gmmcal:test bundle exec bundler-audit update && bundle exec bundler-audit | ||
|
||
# scsslint: | ||
# name: 'Lint: SCSSLint' | ||
# runs-on: ubuntu-20.04 | ||
# needs: build | ||
|
||
# steps: | ||
# - name: Download an image | ||
# uses: ishworkh/[email protected] | ||
# with: | ||
# image: "gmmcal:test" | ||
|
||
# - name: Run SCSSLint | ||
# run: | | ||
# docker run --rm gmmcal:test bundle exec scss-lint --config .scss-lint.yml | ||
|
||
eslint: | ||
name: 'Lint: ESLint' | ||
|
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
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
require: | ||
- rubocop-rails | ||
- rubocop-rspec | ||
- rubocop-factory_bot | ||
|
||
AllCops: | ||
TargetRubyVersion: 3.0 | ||
|
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
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
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
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
Oops, something went wrong.