rspec-checkstyle_formatter 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de9dda2822872bb1e8002c3f35fdf52f17e3230e721bda18d8f214d4b80f4898
4
- data.tar.gz: 4a40aba22f92ddd10b658c57a0ec882d5ac99a0a4ccaf33e12a27fb5a8124395
3
+ metadata.gz: d7e6b216c821b303324641cf590530bd4cb9813a38f4f16c4e0f950a0c19cacc
4
+ data.tar.gz: 2a31edf0e5d76fe47a642f449a7df46dab874d5b85b786f7ba8a0b4ec450e6f1
5
5
  SHA512:
6
- metadata.gz: 7d8ae2db64c9e7bf4f5ef38b9115999474456e869104b658fa0b913c35c5110e092bfc2b74289affaa0904884626c1993aa5a3f3ae60ba5f8bee6127b283fd31
7
- data.tar.gz: 6729994c1b14bb8d4c293bd1ff853b04843d1284481357e7e308a97190ef7f8fa83fe128510d72b01aad354ff3eaf6c3183acf5b9e241d478e27318f8bf12186
6
+ metadata.gz: 4f0ed8d26171f345265221bcca2cf699612829c54030ed651ebd96e526f28fb3daa81b619ccc346e2dce3febd8d6d71510116fb6c2b1ff853c0e0d06b97fae4b
7
+ data.tar.gz: 0d3658a01b538aff552f21b60df5280d3078e7e1d1368c9dfdbde9148406e40289696219c97510a30a9f9926d4d2ac3bf0fbc31f03396b671f6043d84e1f0c59
@@ -0,0 +1,52 @@
1
+ name: CICD
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ test:
7
+ name: Test
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+
12
+ - name: Set up Ruby
13
+ uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: 2.7.1
16
+
17
+ - name: Restore gems
18
+ uses: actions/cache@v2
19
+ with:
20
+ path: vendor/bundle
21
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('rspec-checkstyle_formatter.gemspec') }}
22
+ restore-keys: |
23
+ ${{ runner.os }}-gems-
24
+
25
+ - name: Run rspec
26
+ run: |
27
+ bundle config path vendor/bundle
28
+ bundle install --jobs 4 --retry 3
29
+ bundle exec rspec \
30
+ --no-fail-fast \
31
+ --format RSpec::CheckstyleFormatter \
32
+ --out /tmp/rspec_result.xml
33
+
34
+ - name: Upload rspec result
35
+ if: always()
36
+ uses: actions/upload-artifact@v2
37
+ with:
38
+ name: rspec_result.xml
39
+ path: /tmp/rspec_result.xml
40
+
41
+ - name: Install reviewdog
42
+ if: always()
43
+ uses: reviewdog/action-setup@v1
44
+ with:
45
+ reviewdog_version: latest
46
+
47
+ - name: Report rspec error
48
+ if: always()
49
+ env:
50
+ REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51
+ run: |
52
+ cat /tmp/rspec_result.xml | reviewdog -name=rspec -f=checkstyle -reporter=github-check -filter-mode=nofilter
data/README.md CHANGED
@@ -20,9 +20,69 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- '''
23
+ ```
24
24
  $ bundle exec rspec --format RSpec::CheckstyleFormatter
25
- '''
25
+ ```
26
+
27
+ ### With reviewdog
28
+
29
+ Post the output of rspec to github using a [reviewdog](https://github.com/reviewdog/reviewdog).
30
+
31
+ A sample of GithubActions.
32
+
33
+ ```
34
+ name: CI
35
+
36
+ on: push
37
+
38
+ jobs:
39
+ test:
40
+ name: Test
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - uses: actions/checkout@v2
44
+
45
+ - name: Set up Ruby
46
+ uses: ruby/setup-ruby@v1
47
+
48
+ - name: Restore gems
49
+ uses: actions/cache@v2
50
+ with:
51
+ path: vendor/bundle
52
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
53
+ restore-keys: |
54
+ ${{ runner.os }}-gems-
55
+
56
+ - name: Run rspec
57
+ run: |
58
+ bundle config path vendor/bundle
59
+ bundle install --jobs 4 --retry 3
60
+ bundle exec rspec \
61
+ --no-fail-fast \
62
+ --format RSpec::CheckstyleFormatter \
63
+ --out /tmp/rspec_result.xml
64
+
65
+ - name: Upload rspec result
66
+ if: always()
67
+ uses: actions/upload-artifact@v2
68
+ with:
69
+ name: rspec_result.xml
70
+ path: /tmp/rspec_result.xml
71
+
72
+ - name: Install reviewdog
73
+ if: always()
74
+ uses: reviewdog/action-setup@v1
75
+ with:
76
+ reviewdog_version: latest
77
+
78
+ - name: Report rspec error
79
+ if: always()
80
+ env:
81
+ REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82
+ run: |
83
+ cat /tmp/rspec_result.xml | reviewdog -name=rspec -f=checkstyle -reporter=github-check -filter-mode=nofilter
84
+ ```
85
+
26
86
 
27
87
  ## Development
28
88
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rexml/document'
4
+ require 'rspec/core'
4
5
  require 'rspec/core/formatters/base_formatter'
5
6
 
6
7
  module RSpec
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'rspec-checkstyle_formatter'
5
- spec.version = '0.1.0'
5
+ spec.version = '0.1.1'
6
6
  spec.authors = ['astronoka']
7
7
  spec.email = ['skulituniga@gmail.com']
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-checkstyle_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - astronoka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-11 00:00:00.000000000 Z
11
+ date: 2020-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - ".github/workflows/cicd.yml"
62
63
  - ".gitignore"
63
64
  - ".rspec"
64
65
  - ".travis.yml"