質問編集履歴

2

文の修正

2021/06/19 05:33

投稿

komati88
komati88

スコア6

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- githubにプッシュする際、circleciで自動テストを行おうとしましたが、bundle installで失敗しました
1
+ githubにプッシュする際、circleciで自動テストを行おうとしましたが、bundle install ,restoring cache, Installing Node modules で失敗しました
2
2
 
3
3
 
4
4
 

1

新たなエラーを追加。 解決したエラーは削除しました

2021/06/19 05:33

投稿

komati88
komati88

スコア6

test CHANGED
File without changes
test CHANGED
@@ -6,7 +6,19 @@
6
6
 
7
7
 
8
8
 
9
+ エラー restoring cache
10
+
9
- エラー
11
+ ---
12
+
13
+ ```ここに言語を入力
14
+
15
+ error computing cache key: template: cacheKey:1:30: executing "cacheKey" at <checksum "~/project/yarn.lock">: error calling checksum: open /home/circleci/project/yarn.lock: no such file or directory
16
+
17
+ ```
18
+
19
+
20
+
21
+ エラー  Installing Node modules
10
22
 
11
23
  ---
12
24
 
@@ -14,77 +26,65 @@
14
26
 
15
27
  #!/bin/bash -eo pipefail
16
28
 
17
- if test -f "Gemfile.lock"; then
29
+ if [ ! -f "package.json" ]; then
18
-
30
+
19
- APP_BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")
31
+ echo
20
-
32
+
21
- if [ -z "$APP_BUNDLER_VERSION" ]; then
33
+ echo "---"
22
-
34
+
23
- echo "Could not find bundler version from Gemfile.lock. Please use bundler-version parameter"
35
+ echo "Unable to find your package.json file. Did you forget to set the app-dir parameter?"
36
+
24
-
37
+ echo "---"
38
+
39
+ echo
40
+
41
+ echo "Current directory: $(pwd)"
42
+
43
+ echo
44
+
45
+ echo
46
+
47
+ echo "List directory: "
48
+
49
+ echo
50
+
25
- else
51
+ ls
26
-
27
- echo "Gemfile.lock is bundled with bundler version $APP_BUNDLER_VERSION"
52
+
28
-
29
- fi
53
+ exit 1
30
54
 
31
55
  fi
32
56
 
33
-
34
-
35
- if ! [ -z ]; then
36
-
37
- echo "Found bundler-version parameter to override"
38
-
39
- APP_BUNDLER_VERSION=
40
-
41
- fi
42
-
43
-
44
-
45
- if ! echo $(bundle version) | grep -q $APP_BUNDLER_VERSION; then
46
-
47
- echo "Installing bundler $APP_BUNDLER_VERSION"
48
-
49
- gem install bundler:$APP_BUNDLER_VERSION
50
-
51
- else
52
-
53
- echo "bundler $APP_BUNDLER_VERSION is already installed."
54
-
55
- fi
56
-
57
-
58
-
59
- if [ "./vendor/bundle" == "./vendor/bundle" ]; then
60
-
61
- bundle check --path ./vendor/bundle || bundle install --deployment
62
-
63
- else
64
-
65
- bundle check --path ./vendor/bundle || bundle install --path=./vendor/bundle
66
-
67
- fi
68
-
69
-
70
-
71
-
72
-
73
- Gemfile.lock is bundled with bundler version 2.1.4
74
-
75
- bundler 2.1.4 is already installed.
76
-
77
- [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path './vendor/bundle'`, and stop using this flag
78
-
79
- Your Ruby version is 2.7.3, but your Gemfile specified 2.7.1
80
-
81
- [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag
82
-
83
- Your Ruby version is 2.7.3, but your Gemfile specified 2.7.1
84
-
85
-
86
-
87
- Exited with code exit status 18
57
+ case yarn in
58
+
59
+ npm)
60
+
61
+ if [[ "false" == "true" ]]; then
62
+
63
+ npm install
64
+
65
+ else
66
+
67
+ npm ci
68
+
69
+ fi
70
+
71
+ ;;
72
+
73
+ yarn)
74
+
75
+ if [[ "false" == "true" ]]; then
76
+
77
+ yarn install
78
+
79
+ else
80
+
81
+ yarn install --frozen-lockfile
82
+
83
+ fi
84
+
85
+ ;;
86
+
87
+ esac
88
88
 
89
89
  ```
90
90
 
@@ -134,7 +134,7 @@
134
134
 
135
135
  docker:
136
136
 
137
- - image: circleci/ruby:2.7-node
137
+ - image: circleci/ruby:2.7.1-node
138
138
 
139
139
  working_directory: ~/videoapp
140
140
 
@@ -146,7 +146,7 @@
146
146
 
147
147
  docker:
148
148
 
149
- - image: circleci/ruby:2.7-node
149
+ - image: circleci/ruby:2.7.1-node
150
150
 
151
151
  - image: circleci/postgres:11.6-alpine
152
152