-
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 Standard configuration, and update various files for consistency
- Loading branch information
Showing
41 changed files
with
307 additions
and
273 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 |
---|---|---|
|
@@ -6,15 +6,34 @@ on: | |
branches: [main] | ||
|
||
jobs: | ||
lint_ruby: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
contents: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: .ruby-version | ||
bundler-cache: true | ||
|
||
- name: Run Standard Ruby | ||
uses: standardrb/standard-ruby-action@v1 | ||
|
||
scan_ruby: | ||
runs-on: ubuntu-latest | ||
needs: standard_ruby | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v4.2.2 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
uses: ruby/setup-ruby@v1.202.0 | ||
with: | ||
ruby-version: .ruby-version | ||
bundler-cache: true | ||
|
@@ -27,16 +46,10 @@ jobs: | |
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
# - name: Set up Ruby | ||
# uses: ruby/setup-ruby@v1 | ||
# with: | ||
# ruby-version: .ruby-version | ||
# bundler-cache: true | ||
uses: actions/[email protected] | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
uses: actions/setup-node@v4.1.0 | ||
with: | ||
node-version: 20 | ||
|
||
|
@@ -50,10 +63,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v4.2.2 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
uses: ruby/setup-ruby@v1.202.0 | ||
with: | ||
ruby-version: .ruby-version | ||
bundler-cache: true | ||
|
@@ -64,27 +77,21 @@ jobs: | |
test: | ||
runs-on: ubuntu-latest | ||
|
||
# services: | ||
# redis: | ||
# image: redis | ||
# ports: | ||
# - 6379:6379 | ||
# options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 | ||
steps: | ||
- name: Install packages | ||
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y google-chrome-stable curl libjemalloc2 libvips sqlite3 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v4.2.2 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
uses: ruby/setup-ruby@v1.202.0 | ||
with: | ||
ruby-version: .ruby-version | ||
bundler-cache: true | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
uses: actions/setup-node@v4.1.0 | ||
with: | ||
node-version: 20 | ||
|
||
|
@@ -96,22 +103,19 @@ jobs: | |
|
||
- name: Prepare db | ||
env: | ||
# RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | ||
RAILS_ENV: test | ||
# REDIS_URL: redis://localhost:6379/0 | ||
run: bin/rails db:test:prepare | ||
|
||
- name: Run tests | ||
env: | ||
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | ||
# RAILS_ENV: test | ||
# REDIS_URL: redis://localhost:6379/0 | ||
run: bundle exec rspec | ||
|
||
- name: Keep screenshots from failed system tests | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@v4.4.3 | ||
if: failure() | ||
with: | ||
name: screenshots | ||
path: ${{ github.workspace }}/tmp/screenshots | ||
if-no-files-found: ignore | ||
|
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
uses: actions/[email protected] | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1.201.0 | ||
uses: ruby/setup-ruby@v1.202.0 | ||
with: | ||
ruby-version: .ruby-version | ||
bundler-cache: true | ||
|
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,2 @@ | ||
plugins: | ||
- standard-rails |
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
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.