power-types 0.3.1 → 0.6.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: 99c978ac56c268fde29cbbebdc8f46df56941ca1ab804ea1959b4fa4c7c61bb4
4
- data.tar.gz: a6508e37144bca813c1f631cf2a84004a93920443b457e9a0aa672a7d93588af
3
+ metadata.gz: 4fcacd0da843b9147e8fdee88e0bee0535754df30302cac175f251aa0f1faea7
4
+ data.tar.gz: e1c7423de402d32ae8488f33b101621158f8e7f521f5ced50f68680edc5cfd0d
5
5
  SHA512:
6
- metadata.gz: f61d8bf9b7a00d33807293ba65deea2915c1955f47202382df927931082c9b46ccc2e1b232b72ac8e6708e7decffe8c502a55ad0d70e4f923431a1b68b88648c
7
- data.tar.gz: fd6546b90e49a6ef76587fb91e45c2e8342f1daad4cbe433f72e7d0f83f009ee28a64d9cf8db3e3ed1fff502d75c384c77c192e4f4c66ea1f11dbdd849e6605f
6
+ metadata.gz: db7acee0f6224fa46ae216bae6cf5b4d3a8eb7ff5256e830044e3c9573064605ef350a1da3b72d16e2f6b79d02b78e805e41e2a08b7155da491567cddbb7e031
7
+ data.tar.gz: 908d8b3c6b592b5b0e8b0dcd0db1dd13174c7d66e8b64a20e979675c89ecbd6f3394c4f7bd0f2afe4df2db1d14905e45a139c057575eb74e1e95290e7242004c
@@ -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