Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	administrate.gemspec
  • Loading branch information
damingo committed Jan 11, 2024
2 parents 11e7022 + 024296f commit 3e6957c
Show file tree
Hide file tree
Showing 32 changed files with 291 additions and 166 deletions.
24 changes: 1 addition & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ commands:
- run: google-chrome --version

# Install bundler
- run: gem install bundler:2.3.5
- run: gem install bundler:2.4.22

# Restore Cached Dependencies
- restore_cache:
Expand Down Expand Up @@ -51,27 +51,6 @@ default_job: &default_job
working_directory: ~/administrate

jobs:
ruby-27:
<<: *default_job
steps:
- shared_steps
# Run the tests against the versions of Rails that support Ruby 2.7
- run: bundle exec appraisal install
- run: bundle exec appraisal rails60 rspec
- run: bundle exec appraisal rails61 rspec
- run: bundle exec appraisal rails70 rspec
docker:
- image: cimg/ruby:2.7-browsers
environment:
PGHOST: localhost
PGUSER: administrate
RAILS_ENV: test
- image: cimg/postgres:15.1
environment:
POSTGRES_USER: administrate
POSTGRES_DB: ruby27
POSTGRES_PASSWORD: ""

ruby-30:
<<: *default_job
steps:
Expand Down Expand Up @@ -140,4 +119,3 @@ workflows:
- ruby-32
- ruby-31
- ruby-30
- ruby-27
18 changes: 13 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
---
version: 2

updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
time: '02:00'
timezone: 'Etc/UTC'
4 changes: 2 additions & 2 deletions .github/workflows/bundle-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: 'Bundler Audit'
uses: andrewmcodes/bundler-audit-action@main
uses: thoughtbot/bundler-audit-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: CI
on: [push]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.0', 3.1, 3.2, 3.3]
env:
PGHOST: localhost
PGUSER: administrate
PGPASSWORD: administrate
services:
postgres:
image: postgres
env:
POSTGRES_USER: administrate
POSTGRES_DB: administrate_test
POSTGRES_PASSWORD: administrate
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Install Appraisal dependencies
run: bundle exec appraisal install
- name: Setup the environment
run: cp .sample.env .env
- run: cp spec/example_app/config/database.yml.sample spec/example_app/config/database.yml
- name: Setup the database
run: bundle exec rake db:setup
- name: Run tests
run: bundle exec rspec
- name: Appraise Rails 6.0
run: bundle exec appraisal rails60 rspec
if: ${{ matrix.ruby <= '3.0' }}
- name: Appraise Rails 6.1
run: bundle exec appraisal rails61 rspec
- name: Appraisal Rails 7.0
run: bundle exec appraisal rails70 rspec
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ bundle exec rails s
```

This will start the application defined in `spec/example_app`.
You can view the `example_app` in the browser by navigating to `/admin`

## Repository Structure

Expand Down
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ group :development, :test do
gem "byebug"
gem "dotenv-rails"
gem "factory_bot_rails"
gem "i18n-tasks", "1.0.12"
gem "i18n-tasks", "1.0.13"
gem "pry"
gem "yard"
end
Expand All @@ -31,10 +31,9 @@ group :test do
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "selenium-webdriver", "= 4.9.0"
gem "selenium-webdriver"
gem "shoulda-matchers"
gem "timecop"
gem "webdrivers"
gem "webmock"
gem "webrick"
gem "xpath", "3.2.0"
Expand Down
Loading

0 comments on commit 3e6957c

Please sign in to comment.