power-types 0.3.0 → 0.5.0

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: c46759d4c1c972a8dcfc2bdf1b1cf95c1a7500b5033dfaa9b3b56488a6518d54
4
- data.tar.gz: 5c41fa65e91bf9e73d8fb53351e23a5599bc7e4099bd2ff4f5894647a50fa6df
3
+ metadata.gz: 0d925bbf270d6ba204b3e091b60f5b16a5f02e5c6a76a6cee0ce710ff148f548
4
+ data.tar.gz: f494be84a510e19471380a1b3163e8ccb5b320f7c3307b272090314297a0491c
5
5
  SHA512:
6
- metadata.gz: 662cfd801aed91f2a3098ac92fa66195932741d2915f901868e46f35ef728a2661c1013bd8a36cb293e8277f67f7f33984bbdc0146bc0f8e57f8413f811884d5
7
- data.tar.gz: a08ad9c8a1e6be7debcc02ab6a49d4fedba8ff6672f206d72f142ae5d658c7da67895c0c452e93ddaa67567bc43729e751dbd66d2ae28bcff64f49a010d662f0
6
+ metadata.gz: 8dcbe2f8d896b4f3de9431d79247ce76426528ebc206a8585f33770dab9f110ad9849f8d5a46435c6fcc3fd84493cddcdec5d6b1916ce7f238dd74d4a825f6d3
7
+ data.tar.gz: 26570fe587be13f151c0ac0627b361de02977ad32c3651ee1f5f6f7135b0357c33d55fe217931cc569a81a09756b8aff0efc7ef30c0d52cb35e9039db5aef87c
@@ -0,0 +1,103 @@
1
+ version: 2.1
2
+
3
+ env-vars: &env-vars
4
+ RAILS_ENV: test
5
+ NODE_ENV: test
6
+ BUNDLE_PATH: vendor/bundle
7
+
8
+ orbs:
9
+ ruby: circleci/ruby@0.1.2
10
+ browser-tools: circleci/browser-tools@1.1.3
11
+
12
+ executors:
13
+ main-executor:
14
+ parameters:
15
+ ruby-version:
16
+ description: "Ruby version"
17
+ default: "2.7"
18
+ type: string
19
+ docker:
20
+ - image: circleci/ruby:<<parameters.ruby-version>>-node
21
+ environment: *env-vars
22
+
23
+ commands:
24
+ setup:
25
+ description: checkout code and install dependencies
26
+ steps:
27
+ - checkout
28
+ - run:
29
+ name: Install bundle dependencies
30
+ command: |
31
+ gem install bundler:2.2.15
32
+ bundle install
33
+
34
+ jobs:
35
+ lint:
36
+ executor: main-executor
37
+ steps:
38
+ - setup
39
+ - run:
40
+ name: Install reviewdog
41
+ command: |
42
+ curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b ./bin
43
+ - run:
44
+ name: Get files to lint
45
+ command: |
46
+ mkdir tmp
47
+ git diff origin/master --name-only --diff-filter=d > tmp/files_to_lint
48
+ - run:
49
+ name: Run rubocop
50
+ shell: /bin/bash
51
+ command: |
52
+ cat tmp/files_to_lint | grep -E '.+\.(rb)$' | xargs bundle exec rubocop --force-exclusion \
53
+ | ./bin/reviewdog -reporter=github-pr-review -f=rubocop
54
+ test:
55
+ parameters:
56
+ ruby-version:
57
+ description: "Ruby version"
58
+ default: "2.7"
59
+ type: string
60
+ executor:
61
+ name: main-executor
62
+ ruby-version: <<parameters.ruby-version>>
63
+ steps:
64
+ - setup
65
+ - run:
66
+ name: Run Tests
67
+ command: |
68
+ RSPEC_JUNIT_ARGS="-r rspec_junit_formatter -f RspecJunitFormatter -o test_results/rspec.xml"
69
+ RSPEC_FORMAT_ARGS="-f progress --no-color -p 10"
70
+ bundle exec rspec ./spec $RSPEC_FORMAT_ARGS $RSPEC_JUNIT_ARGS
71
+ - store_test_results:
72
+ path: test_results
73
+ deploy:
74
+ executor: main-executor
75
+ steps:
76
+ - setup
77
+ - run:
78
+ name: Setup rubygems
79
+ command: bash .circleci/setup-rubygems.sh
80
+ - run:
81
+ name: Publish to rubygems
82
+ command: |
83
+ gem build power-types.gemspec
84
+ version_tag=$(git describe --tags)
85
+ gem push power-types-${version_tag#v}.gem
86
+
87
+ workflows:
88
+ version: 2
89
+ main:
90
+ jobs:
91
+ - lint:
92
+ context: org-global
93
+ - test:
94
+ matrix:
95
+ parameters:
96
+ ruby-version: ["2.5", "2.6", "2.7"]
97
+ - deploy:
98
+ context: org-global
99
+ filters:
100
+ tags:
101
+ only: /.*/
102
+ branches:
103
+ ignore: /.*/
@@ -0,0 +1,3 @@
1
+ mkdir ~/.gem
2
+ echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
3
+ chmod 0600 /home/circleci/.gem/credentials