@andrewmcodes/actions
Composite Actions and Shared Workflows for GitHub Actions
As of now, this is only meant for my personal use, and is WIP, but usage instructions are below that will ensure if you do use this, it won't change out from under you.
Warning If you decide to use one of these actions, make sure to pin the action to a specific SHA or tag.
To be totally safe, you can fork this repo and use your own fork as the source of the action while I continue to iterate on this.
- Setup
setup-nodesetup-ruby
- Linters
brakemanbundler-auditstandard
- Release
release-please-simple
name: "Ruby on Rails CI"on:
push:
branches: [ main ]pull_request:
branches: [ main ]jobs:
test:
runs-on: ubuntu-latestservices:
postgres:
image: postgres:11-alpineports:
- "5432:5432"env:
POSTGRES_DB: rails_testPOSTGRES_USER: railsPOSTGRES_PASSWORD: passwordenv:
RAILS_ENV: testDATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"steps:
- name: Checkout codeuses: actions/checkout@v3# Add or replace dependency steps here
- name: Setup Rubyuses: andrewmcodes/actions/setup-ruby@main# Add or replace database setup steps here
- name: Set up database schemarun: bin/rails db:schema:load# Add or replace test runners here
- name: Run testsrun: bin/rakelint:
runs-on: ubuntu-lateststeps:
- name: Checkout codeuses: actions/checkout@v3
- name: Setup Rubyuses: andrewmcodes/actions/setup-ruby@main
- name: Setup Nodeuses: andrewmcodes/actions/setup-node@main
- name: Bundler Audituses: andrewmcodes/actions/bundler-audit@main
- name: Brakemanuses: andrewmcodes/actions/brakeman@main
- name: Standarduses: andrewmcodes/actions/standard@mainContributions will be welcome once this becomes a little more stable.