Skip to content

Commit

Permalink
Some comments and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jagthedrummer committed Oct 20, 2023
1 parent 23e39c1 commit cd1250b
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 47 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/_database_schema_check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This workflow will run standardrb.
# This workflow is pimarily meant to be called by other workflows.
# This workflow will ensure that when we run `rails db:migrate` that no changes are made to `db/schema.rb`.
#
# This workflow is pimarily meant to be called by other workflows, but it can be run manually.
name: "🔎 ~ Database Schema Check"
on:
workflow_call:
Expand All @@ -15,13 +16,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
# Add or replace dependency steps here

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

# Add or replace test runners here
- name: Database Schema Check
id: db-schema-check
run : bash ./.circleci/db_schema_check
11 changes: 11 additions & 0 deletions .github/workflows/_deploy_heroku.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# This workflow will deploy an app to heroku.
#
# The name of the app to deploy must be passed in.
# HEROKU_API_KEY & HEROKU_EMAIL should be added to your repo secrets to provide deployment credentials.
#
# This workflow is pimarily meant to be called by other workflows, but it can be run manually.
name: 🚢 ~ Deploy to Heroku

on:
Expand All @@ -6,6 +12,11 @@ on:
heroku-app-name:
required: true
type: string
workflow_dispatch:
inputs:
heroku-app-name:
required: true
type: string

jobs:
heroku:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/_reusable_workflows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This is a dummy workflow that's just here to add a bit of organization to the workflow list
# This is a dummy workflow that's just here to add a bit of organization to the workflow list.
# Too bad they don't allow you to hide workflows or something.
name: " 🚫 |----- Reusable Worflows Below"
on:
workflow_call:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/_run_super_scaffolding_tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This workflow will install a prebuilt Ruby version, install dependencies, and run tests.
# This workflow is pimarily meant to be called by other workflows.
# This workflow will run a few super scaffolding commands and then run tests against the generated code.
#
# This workflow is pimarily meant to be called by other workflows, but it can be run manually.
name: 🏗️ ~ Run super scaffolding tests
on:
workflow_call:
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
# Add or replace dependency steps here

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -89,7 +90,6 @@ jobs:
asset-cache-${{ runner.os }}-${{ github.ref }}-
asset-cache-${{ runner.os }}-
# Add or replace database setup steps here
- name: Set up database schema
run: bin/rails db:schema:load

Expand Down Expand Up @@ -122,5 +122,4 @@ jobs:
uses: test-summary/action@v2
with:
paths: "test/reports/**/TEST-*.xml"
#output: test-summary.md
if: always()
37 changes: 4 additions & 33 deletions .github/workflows/_run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This workflow will install a prebuilt Ruby version, install dependencies, and run tests.
# This workflow is pimarily meant to be called by other workflows.
# This workflow runs the main test suite.
#
# This workflow is pimarily meant to be called by other workflows, but it can be run manually.
name: "🧪 ~ Run tests"
on:
workflow_call:
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
# Add or replace dependency steps here

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -89,24 +90,19 @@ jobs:
asset-cache-${{ runner.os }}-${{ github.ref }}-
asset-cache-${{ runner.os }}-
# Add or replace database setup steps here
- name: Set up database schema
run: bin/rails db:schema:load

- run: yarn install
- run: yarn build
- run: yarn build:css

# Add or replace test runners here
- name: Run Tests
id: run-tests
env:
AUTH_ENDPOINT: https://no-site.nowhere
AWS_REGION: us-east-1
# Specifies how many jobs you would like to run in parallel,
# used for partitioning
CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
# Use the index from matrix as an environment variable
CI_NODE_INDEX: ${{ matrix.ci_node_index }}
continue-on-error: false
run : ./bin/parallel-ci
Expand All @@ -116,29 +112,4 @@ jobs:
uses: test-summary/action@v2
with:
paths: "test/reports/**/TEST-*.xml"
#output: test-summary.md
if: always()

#- name: Upload test summary
#uses: actions/upload-artifact@v3
#with:
#name: test-summary
#path: test-summary.md
#if: always()

#lint:
#runs-on: ubuntu-latest
#steps:
#- name: Checkout code
#uses: actions/checkout@v3
#- name: Install Ruby and gems
#uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0
#with:
#bundler-cache: true
## Add or replace any other lints here
#- name: Security audit dependencies
#run: bin/bundler-audit --update
#- name: Security audit application code
#run: bin/brakeman -q -w2
#- name: Lint Ruby files
#run: bin/rubocop --parallel
6 changes: 3 additions & 3 deletions .github/workflows/_standardrb.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This workflow will run standardrb.
# This workflow is pimarily meant to be called by other workflows.
#
# This workflow is pimarily meant to be called by other workflows, but it can be run manually.
name: "🔬 ~ Standardrb"
on:
workflow_call:
Expand All @@ -15,13 +16,12 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
# Add or replace dependency steps here

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

# Add or replace test runners here
- name: Run Standardrb
id: run-standardrb
run : bundle exec standardrb
17 changes: 17 additions & 0 deletions .github/workflows/ci-cd-pipeline-main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# This workflow will run whenever commits land on the main branch.
#
# It will run tests and a few safety checks.
#
# If everything passes it can be set to auto-deploy to your production app on Heroku.
#
# This workflow is primarily meant to be triggered automatically, but it can be run manually.
name: " 🎥 Main CI/CD Pipeline (prod)"
on:
workflow_dispatch:
Expand All @@ -21,6 +28,16 @@ jobs:
name: 🔎 DB Schema Check
uses: ./.github/workflows/_database_schema_check.yml
secrets: inherit
# If you'd like to auto-deploy to your production environment you can uncomment this next block.
# You'll need to set HEROKU_EMAIL and HEROKU_API_KEY in your repo secrets.
# Be sure to set the app name correctly below.
# deploy:
# name: 🚢 Deploy to Heroku
# uses: ./.github/workflows/_deploy_heroku.yml
# needs: [mini_test, super_scaffolding, standardrb, db_schema]
# secrets: inherit
# with:
# heroku-app-name: ""
deploy:
name: 🚢 Deploy to Heroku
uses: ./.github/workflows/_deploy_heroku.yml
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ci-cd-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# This workflow will run whenever a PR is opened or changed.
#
# It will run tests and a few safety checks.
#
# If everything passes it can be set to auto-deploy to your staging app on Heroku.
#
# This workflow is primarily meant to be triggered automatically, but it can be run manually.
name: " 💻 PR CI/CD Pipeline (staging)"
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
#branches: [ "main" ]

jobs:
mini_test:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/upgrade-bullet-train.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This workflow will create a pull request in your repo that will update
# your app to whatever version of Bullet Train that you specify.
name: " ↗️ Create Bullet Train Upgrade PR"
on:
workflow_dispatch:
Expand Down

0 comments on commit cd1250b

Please sign in to comment.