rolemodel-rails 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1544b6265be0457f98b6273536b191316aa14c34798360e4fe0582f1f0f407ae
|
|
4
|
+
data.tar.gz: 4663c282bc2bad26c21a96d5a851291ca7ebd9ed7fdfe443646df7a1932af5e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0441af8eb9399c2d31795768daa4deefdad23dc623c40b412c53b4fdc3d53edf3b9eb47c3dc5ce54f726ab6e5e54cf5c7bffdb1581ffab4849f7f2d99cb0890b
|
|
7
|
+
data.tar.gz: e23edd7583193869bce7a5236c920fffde5dbcbb522c472cb3786ff5ad4b99d0554daedf1ff7c9fc221d90d350aa2089a71e6b2bb0d7addc11b3b7a31d903ade
|
|
@@ -7,7 +7,7 @@ It doesn't need to be run first, but the parallel_tests generator must be run in
|
|
|
7
7
|
## What you get
|
|
8
8
|
|
|
9
9
|
- CI workflow
|
|
10
|
-
- A
|
|
10
|
+
- A `ci.yml` that calls RoleModel/actions' reusable [`rails-ci.yml`](https://github.com/RoleModel/actions#rails-ci-reusable-workflow) workflow: RuboCop, ESLint, Brakeman, and the full RSpec suite in parallel. Pass `--no-playwright` to run system tests in Chrome instead of Playwright.
|
|
11
11
|
- Along with the `ci.yml`, your `database.yml` will be modified to be able to be run in GHA.
|
|
12
12
|
- Deploy workflows
|
|
13
13
|
- `deploy-staging.yml` deploys to Heroku on every push to `main` (or manually); `deploy-production.yml` deploys manually via `workflow_dispatch`.
|
|
@@ -6,17 +6,13 @@ module Rolemodel
|
|
|
6
6
|
source_root File.expand_path('templates', __dir__)
|
|
7
7
|
|
|
8
8
|
class_option :playwright, type: :boolean, default: true,
|
|
9
|
-
desc: '
|
|
9
|
+
desc: 'Install Playwright in CI for system tests? (otherwise Chrome)'
|
|
10
10
|
|
|
11
11
|
def set_rm_actions_version
|
|
12
12
|
tags = `git ls-remote --tags #{GITHUB_ACTIONS_REPO}` rescue 'refs/tags/v3'
|
|
13
13
|
@rm_actions_version = tags.scan(%r{refs/tags/v(\d+)\s*$}).flatten.max_by(&:to_i)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def set_webdriver
|
|
17
|
-
@webdriver = options.playwright? ? 'playwright' : 'selenium'
|
|
18
|
-
end
|
|
19
|
-
|
|
20
16
|
def install_github_config
|
|
21
17
|
directory 'workflows', '.github/workflows', force: true
|
|
22
18
|
template 'pull_request_template.md', '.github/pull_request_template.md'
|
|
@@ -2,80 +2,23 @@ name: CI
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
+
branches: [main]
|
|
5
6
|
pull_request:
|
|
6
7
|
|
|
7
8
|
concurrency:
|
|
8
|
-
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event.ref }}
|
|
9
10
|
cancel-in-progress: true
|
|
10
11
|
|
|
11
|
-
env:
|
|
12
|
-
CI: true
|
|
13
|
-
RAILS_ENV: test
|
|
14
|
-
POSTGRES_USER: postgres
|
|
15
|
-
POSTGRES_PASSWORD: password
|
|
16
|
-
|
|
17
12
|
jobs:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
steps:
|
|
31
|
-
- uses: actions/checkout@v6
|
|
32
|
-
- uses: RoleModel/actions/compile-assets@v<%= @rm_actions_version %>
|
|
33
|
-
id: check-asset-cache
|
|
34
|
-
|
|
35
|
-
non-system-test:
|
|
36
|
-
name: Linting & Ruby Non-System Tests
|
|
37
|
-
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
38
|
-
timeout-minutes: 5
|
|
39
|
-
services:
|
|
40
|
-
postgres:
|
|
41
|
-
image: postgres:17
|
|
42
|
-
ports: [ "5432:5432" ]
|
|
43
|
-
env:
|
|
44
|
-
POSTGRES_USER: postgres
|
|
45
|
-
POSTGRES_PASSWORD: password
|
|
46
|
-
|
|
47
|
-
steps:
|
|
48
|
-
- uses: actions/checkout@v6
|
|
49
|
-
- uses: ruby/setup-ruby@v1
|
|
50
|
-
with: { bundler-cache: true }
|
|
51
|
-
- run: bin/bundler-audit
|
|
52
|
-
- run: bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error
|
|
53
|
-
- run: bundle exec rubocop --format github
|
|
54
|
-
- uses: RoleModel/actions/linting-and-non-system-tests@v<%= @rm_actions_version %>
|
|
55
|
-
with:
|
|
56
|
-
needs-compiled-assets: false
|
|
57
|
-
|
|
58
|
-
system-test:
|
|
59
|
-
name: Ruby System Tests
|
|
60
|
-
runs-on: blacksmith-8vcpu-ubuntu-2404
|
|
61
|
-
timeout-minutes: 15
|
|
62
|
-
needs: compile-assets
|
|
63
|
-
services:
|
|
64
|
-
postgres:
|
|
65
|
-
image: postgres:17
|
|
66
|
-
ports: [ "5432:5432" ]
|
|
67
|
-
env:
|
|
68
|
-
POSTGRES_USER: postgres
|
|
69
|
-
POSTGRES_PASSWORD: password
|
|
70
|
-
|
|
71
|
-
steps:
|
|
72
|
-
- uses: actions/checkout@v6
|
|
73
|
-
# Uncomment the following if your app require VIPS for processing ActiveStorage variant images in system tests.
|
|
74
|
-
# - name: Setup vips
|
|
75
|
-
# run: |
|
|
76
|
-
# sudo apt-get update
|
|
77
|
-
# sudo apt-get install -y libvips
|
|
78
|
-
- uses: RoleModel/actions/system-tests@v<%= @rm_actions_version %>
|
|
79
|
-
with:
|
|
80
|
-
web-driver: <%= @webdriver %>
|
|
81
|
-
# failure-screenshot-dir: tmp/screenshots
|
|
13
|
+
ci:
|
|
14
|
+
uses: RoleModel/actions/.github/workflows/rails-ci.yml@v<%= @rm_actions_version %>
|
|
15
|
+
with:
|
|
16
|
+
# apt_packages: libvips # if ActiveStorage variants are processed in system tests
|
|
17
|
+
<% if options.playwright? -%>
|
|
18
|
+
playwright: true
|
|
19
|
+
<% end -%>
|
|
20
|
+
rubocop_command: bundle exec rubocop --format github
|
|
21
|
+
js_lint_command: yarn eslint
|
|
22
|
+
dependency_audit_command: bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error
|
|
23
|
+
failure-screenshot-dir: tmp/screenshots
|
|
24
|
+
secrets: inherit
|
data/lib/rolemodel/version.rb
CHANGED