Skip to content

Commit

Permalink
Update working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
allthesignals committed May 28, 2024
1 parent 4b0da8f commit ad1f563
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/actions/cleanup-gemfile/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ runs:
- name: Remove Debug Gems
shell: bash
run: |
sed -i '/debase-ruby_core_source/d' ./Gemfile
sed -i '/debase/d' ./Gemfile
sed -i '/ruby-debug-ide/d' ./Gemfile
sed -i '/debase-ruby_core_source/d' ./app/Gemfile
sed -i '/debase/d' ./app/Gemfile
sed -i '/ruby-debug-ide/d' ./app/Gemfile
4 changes: 4 additions & 0 deletions .github/actions/setup-languages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ runs:

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: app

- name: Install Dependencies
shell: bash
working-directory: app
run: bundle install

- name: Set up node
Expand All @@ -22,3 +25,4 @@ runs:
- name: Install npm dependencies
shell: bash
run: npm install --frozen-lockfile
working-directory: app
2 changes: 2 additions & 0 deletions .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ runs:
env:
RAILS_ENV: ${{ inputs.rails_env }}
shell: bash
working-directory: app
run: bundle exec rake assets:precompile

- name: Set up database
env:
RAILS_ENV: ${{ inputs.rails_env }}
DATABASE_URL: ${{ inputs.database_url }}
shell: bash
working-directory: app
run: bundle exec rake db:schema:load
9 changes: 6 additions & 3 deletions .github/workflows/brakeman-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ name: Brakeman Scan
on:
push:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'README.md'
paths: ['app/**']
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
paths: ['app/**']
schedule:
# cron format: 'minute hour dayofmonth month dayofweek'
# this will run at noon UTC each Monday (7am EST / 8am EDT)
- cron: '0 12 * * 1'
defaults:
run:
working-directory: ./app

jobs:
brakeman-scan:
Expand All @@ -33,5 +35,6 @@ jobs:

# Execute Brakeman CLI.
- name: Scan
working-directory: app
run: |
bundle exec brakeman .
9 changes: 7 additions & 2 deletions .github/workflows/dependency-scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
push:
branches: [ main ]
paths-ignore:
- 'doc/**'
- 'README.md'
- 'app/doc/**'
- 'app/README.md'
pull_request:
branches: [ main ]
paths: ['app/**']
schedule:
# cron format: 'minute hour dayofmonth month dayofweek'
# this will run at noon UTC every day (7am EST / 8am EDT)
Expand All @@ -25,6 +26,7 @@ jobs:

- name: Update advisory database and run checks
run: bundle exec rake bundler:audit
working-directory: app

npm-audit:
name: npm audit
Expand All @@ -37,6 +39,7 @@ jobs:

- name: Run npm audit
run: bundle exec rake npm:audit
working-directory: app

ruby-bom:
name: Ruby SBOM Generation
Expand All @@ -48,8 +51,10 @@ jobs:
- name: Install cyclonedx
run: gem install cyclonedx-ruby
- name: Generate BOM
working-directory: app
run: cyclonedx-ruby -p . -o ruby_bom.xml
- name: Save BOM
working-directory: app
uses: actions/upload-artifact@v3
with:
name: ruby-bom
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pa11y.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: pa11y tests

on: [pull_request]
on: []
defaults:
run:
working-directory: ./app

jobs:
pa11y_scan:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: rspec tests

on: [pull_request]
on:
pull_request:
paths: ['app/**']

jobs:
rspec:
Expand Down Expand Up @@ -30,7 +32,9 @@ jobs:
rails_env: test

- name: Run rspec
working-directory: app
env:
RAILS_ENV: test
DATABASE_URL: ${{ steps.setup.outputs.database_url }}
RAILS_MASTER_KEY: 0f5db7adba61669d4cc45dfa6b2464d7
run: bundle exec rspec
5 changes: 4 additions & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Rubocop style checks

on: [pull_request]
on:
pull_request:
paths: ['app/**']

jobs:
rspec:
Expand All @@ -11,4 +13,5 @@ jobs:
- name: Set up Ruby & Javascript
uses: ./.github/actions/setup-languages
- name: Run Rubocop
working-directory: app
run: bundle exec rubocop

0 comments on commit ad1f563

Please sign in to comment.