jt_tools 0.0.17 → 0.0.18
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 +4 -4
- data/lib/install/.circleci/config.yml +16 -5
- data/lib/install/.github/{config.yml → dependabot.yml} +0 -0
- data/lib/install/.github/workflows/test.yml +147 -0
- data/lib/install/bin/lint-pr +1 -1
- data/lib/jt_tools/version.rb +1 -1
- data/package.json +1 -1
- data/template.rb +1 -12
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8430c5429297a43d72748ef58a23413f92f49b1658101e5597fb5ef28a31ae8a
|
4
|
+
data.tar.gz: dc5ffe8fd612843809b2ef6bb5c152f48b33b4db66ec0e3ae5b8a89f8853e924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 877f397b6bd8a68be424e350913c90c4c774478f6d98441f16ae84cb92d8e14de1e6975eb3004f69a40b2c00e6af692412092b15bee7b8231315a76e96e71ada
|
7
|
+
data.tar.gz: 9e241e3ef386b9a1fbac045eb152677ddd8e317e890545fa881bdcf70e2a3b508af7b8573cb126368d888998c0ac578300e851023910a715242b775c307edc53
|
@@ -13,9 +13,11 @@ orbs:
|
|
13
13
|
|
14
14
|
workflows:
|
15
15
|
version: 2
|
16
|
-
|
16
|
+
commit:
|
17
17
|
jobs:
|
18
|
-
- test
|
18
|
+
- test:
|
19
|
+
requires:
|
20
|
+
- lint
|
19
21
|
- lint:
|
20
22
|
filters:
|
21
23
|
branches:
|
@@ -23,6 +25,15 @@ workflows:
|
|
23
25
|
- master
|
24
26
|
- production
|
25
27
|
- staging
|
28
|
+
merge:
|
29
|
+
jobs:
|
30
|
+
- test:
|
31
|
+
filters:
|
32
|
+
branches:
|
33
|
+
only:
|
34
|
+
- master
|
35
|
+
- production
|
36
|
+
- staging
|
26
37
|
|
27
38
|
auto_upgrade_tools:
|
28
39
|
triggers:
|
@@ -102,14 +113,12 @@ jobs:
|
|
102
113
|
- run:
|
103
114
|
name: Precompile Assets
|
104
115
|
command: |
|
105
|
-
bin/webpack
|
106
116
|
bin/rails assets:precompile
|
107
117
|
|
108
118
|
- save_cache:
|
109
119
|
key: asset-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ .Environment.CIRCLE_SHA1 }}
|
110
120
|
paths:
|
111
|
-
- public/
|
112
|
-
- public/pack-test
|
121
|
+
- public/packs-test
|
113
122
|
- tmp/cache/assets
|
114
123
|
- tmp/cache/webpacker
|
115
124
|
|
@@ -145,6 +154,8 @@ jobs:
|
|
145
154
|
path: ./tmp/reports/
|
146
155
|
- store_artifacts:
|
147
156
|
path: ./coverage
|
157
|
+
- store_artifacts:
|
158
|
+
path: ./tmp/screenshots
|
148
159
|
lint:
|
149
160
|
docker:
|
150
161
|
- image: cimg/ruby:3.0-node
|
File without changes
|
@@ -0,0 +1,147 @@
|
|
1
|
+
---
|
2
|
+
name: Test
|
3
|
+
|
4
|
+
# yamllint disable-line rule:truthy
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [$default-branch]
|
8
|
+
pull_request:
|
9
|
+
|
10
|
+
env:
|
11
|
+
CI: true
|
12
|
+
RAILS_ENV: test
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
lint:
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
env:
|
18
|
+
BUNDLE_GEMFILE: Gemfile.tools
|
19
|
+
COVERAGE: true
|
20
|
+
DISABLE_SPRING: 1
|
21
|
+
steps:
|
22
|
+
- run: |-
|
23
|
+
sudo apt-get update -qq && \
|
24
|
+
sudo apt-get install -yq --no-install-recommends \
|
25
|
+
cmake yamllint python3-setuptools python3-pkg-resources pkg-config
|
26
|
+
|
27
|
+
- uses: actions/checkout@v2
|
28
|
+
with:
|
29
|
+
fetch-depth: 10
|
30
|
+
|
31
|
+
- name: Set up Ruby
|
32
|
+
uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: 3.0
|
35
|
+
bundler-cache: true
|
36
|
+
|
37
|
+
- name: Use Node.js
|
38
|
+
uses: actions/setup-node@v1
|
39
|
+
with:
|
40
|
+
node-version: 14
|
41
|
+
|
42
|
+
- name: Get yarn cache directory path
|
43
|
+
id: yarn-cache-dir-path
|
44
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
45
|
+
|
46
|
+
- uses: actions/cache@v2
|
47
|
+
with:
|
48
|
+
path: |
|
49
|
+
**/node_modules
|
50
|
+
${{ steps.yarn-cache-dir-path.outputs.dir }}
|
51
|
+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
52
|
+
restore-keys: |
|
53
|
+
${{ runner.os }}-modules-
|
54
|
+
|
55
|
+
- run: bin/yarn check || bin/yarn install
|
56
|
+
|
57
|
+
- run: git fetch origin master --depth 1
|
58
|
+
- run: bin/lint-pr
|
59
|
+
test:
|
60
|
+
needs: [lint]
|
61
|
+
runs-on: ubuntu-latest
|
62
|
+
env:
|
63
|
+
COVERAGE: true
|
64
|
+
DATABASE_URL: postgresql://postgres_user:postgres@localhost:5432/postgres_db
|
65
|
+
|
66
|
+
services:
|
67
|
+
postgres:
|
68
|
+
image: circleci/postgres:alpine-ram
|
69
|
+
env:
|
70
|
+
POSTGRES_DB: postgres_db
|
71
|
+
POSTGRES_USER: postgres_user
|
72
|
+
POSTGRES_PASSWORD: postgres
|
73
|
+
ports:
|
74
|
+
- 5432:5432
|
75
|
+
options: >-
|
76
|
+
--health-cmd pg_isready
|
77
|
+
--health-interval 10s
|
78
|
+
--health-timeout 5s
|
79
|
+
--health-retries 5
|
80
|
+
|
81
|
+
steps:
|
82
|
+
- name: Install PostgreSQL 11 client
|
83
|
+
run: |
|
84
|
+
sudo apt-get -yqq install libpq-dev
|
85
|
+
|
86
|
+
- uses: actions/checkout@v2
|
87
|
+
- name: Set up Ruby
|
88
|
+
uses: ruby/setup-ruby@v1
|
89
|
+
with:
|
90
|
+
ruby-version: 3.0
|
91
|
+
bundler-cache: true
|
92
|
+
|
93
|
+
- name: Setup DB
|
94
|
+
run: bundle exec rake db:test:prepare
|
95
|
+
|
96
|
+
- name: Use Node.js
|
97
|
+
uses: actions/setup-node@v1
|
98
|
+
with:
|
99
|
+
node-version: 14
|
100
|
+
|
101
|
+
- name: Get yarn cache directory path
|
102
|
+
id: yarn-cache-dir-path
|
103
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
104
|
+
|
105
|
+
- uses: actions/cache@v2
|
106
|
+
with:
|
107
|
+
path: |
|
108
|
+
**/node_modules
|
109
|
+
${{ steps.yarn-cache-dir-path.outputs.dir }}
|
110
|
+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
111
|
+
restore-keys: |
|
112
|
+
${{ runner.os }}-modules-
|
113
|
+
|
114
|
+
- run: bin/yarn check || bin/yarn install
|
115
|
+
|
116
|
+
- uses: actions/cache@v2
|
117
|
+
with:
|
118
|
+
path: |
|
119
|
+
public/assets
|
120
|
+
public/packs-test
|
121
|
+
tmp/cache/assets
|
122
|
+
tmp/cache/webpacker
|
123
|
+
key: "${{ runner.os }}-assets-${{ hashFiles('**/yarn.lock') }}\
|
124
|
+
-${{ hashFiles('**/app/assets') }}-${{ hashFiles('**/app/javascript') }}"
|
125
|
+
|
126
|
+
restore-keys: |
|
127
|
+
${{ runner.os }}-assets-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/app/assets') }}
|
128
|
+
${{ runner.os }}-assets-${{ hashFiles('**/yarn.lock') }}
|
129
|
+
${{ runner.os }}-assets-
|
130
|
+
|
131
|
+
- name: Precompile assets
|
132
|
+
run: bundle exec rake assets:precompile
|
133
|
+
|
134
|
+
- name: Run tests
|
135
|
+
run: bin/rails test "test/**/*_test.rb"
|
136
|
+
|
137
|
+
- name: Upload Coverage
|
138
|
+
uses: actions/upload-artifact@v2
|
139
|
+
with:
|
140
|
+
name: coverage
|
141
|
+
path: coverage
|
142
|
+
|
143
|
+
- name: Upload Capybara Screenshots
|
144
|
+
uses: actions/upload-artifact@v2
|
145
|
+
with:
|
146
|
+
name: capybara-screenshots
|
147
|
+
path: tmp/screenshots
|
data/lib/install/bin/lint-pr
CHANGED
data/lib/jt_tools/version.rb
CHANGED
data/package.json
CHANGED
data/template.rb
CHANGED
@@ -80,12 +80,6 @@ def add_template_repository_to_source_path
|
|
80
80
|
"require 'simplecov' if ENV['COVERAGE']\n",
|
81
81
|
after: /\A/
|
82
82
|
)
|
83
|
-
insert_into_file(
|
84
|
-
'.circleci/config.yml',
|
85
|
-
"\n" \
|
86
|
-
' - run: bin/rspec --format RspecJunitFormatter --out tmp/reports/rspec-results.xml --format progress',
|
87
|
-
after: '# rails test'
|
88
|
-
)
|
89
83
|
else
|
90
84
|
gem 'minitest-ci', require: false, group: :test
|
91
85
|
insert_into_file(
|
@@ -93,12 +87,6 @@ def add_template_repository_to_source_path
|
|
93
87
|
"require 'simplecov' if ENV['COVERAGE']\n",
|
94
88
|
after: /\A/
|
95
89
|
)
|
96
|
-
insert_into_file(
|
97
|
-
'.circleci/config.yml',
|
98
|
-
"\n" + ' - run: bin/rails test "test/**/*_test.rb"',
|
99
|
-
after: '# rails test'
|
100
|
-
)
|
101
|
-
|
102
90
|
gsub_file 'test/test_helper.rb',
|
103
91
|
'parallelize(workers: :number_of_processors)',
|
104
92
|
"parallelize(workers: :number_of_processors) unless ENV['COVERAGE']"
|
@@ -136,6 +124,7 @@ def add_template_repository_to_source_path
|
|
136
124
|
Bundler.with_original_env do
|
137
125
|
say '=> Install tools'
|
138
126
|
run 'bin/tools-setup'
|
127
|
+
run 'BUNDLE_GEMFILE=Gemfile.tools bundle lock --add-platform x86_64-linux'
|
139
128
|
|
140
129
|
say '=> Generate binstubs for linters'
|
141
130
|
run 'BUNDLE_GEMFILE=Gemfile.tools bundle binstub --force pronto'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jt_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Keen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -74,7 +74,8 @@ files:
|
|
74
74
|
- lib/install/.eslintrc.js
|
75
75
|
- lib/install/.fasterer.yml
|
76
76
|
- lib/install/.gitattributes
|
77
|
-
- lib/install/.github/
|
77
|
+
- lib/install/.github/dependabot.yml
|
78
|
+
- lib/install/.github/workflows/test.yml
|
78
79
|
- lib/install/.pronto.yml
|
79
80
|
- lib/install/.pronto_eslint_npm.yml
|
80
81
|
- lib/install/.reek.yml
|