Skip to content

Commit 0e828a4

Browse files
using orbs
1 parent 4e16e45 commit 0e828a4

File tree

1 file changed

+12
-33
lines changed

1 file changed

+12
-33
lines changed

.circleci/config.yml

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,30 @@
11
version: 2.1
22

3-
executors:
4-
go-executor:
5-
docker:
6-
- image: circleci/golang:1.18
7-
working_directory: ~/go/src/github.com/coderabbitai/grafana
8-
9-
node-executor:
10-
docker:
11-
- image: circleci/node:16
12-
working_directory: ~/frontend
3+
orbs:
4+
node: circleci/[email protected]
5+
go: circleci/[email protected]
136

147
jobs:
158
build-backend:
16-
executor: go-executor
9+
executor: go/default
1710
steps:
1811
- checkout
19-
- restore_cache:
20-
keys:
21-
- go-mod-cache-{{ checksum "go.sum" }}
22-
- go-mod-cache-
2312
- run:
24-
name: Install Go dependencies
25-
command: go mod download
26-
- save_cache:
27-
paths:
28-
- ~/go/pkg/mod
29-
key: go-mod-cache-{{ checksum "go.sum" }}
13+
name: Tidy Go modules
14+
command: go mod tidy
15+
- go/install-deps:
16+
cache-path: ~/go/pkg/mod
3017
- run:
3118
name: Build backend
32-
command: go build -o bin/backend ./...
19+
command: go run build.go build
3320

3421
build-frontend:
35-
executor: node-executor
22+
executor: node/default
3623
steps:
3724
- checkout
38-
- restore_cache:
39-
keys:
40-
- yarn-cache-{{ checksum "yarn.lock" }}
41-
- yarn-cache-
4225
- run:
43-
name: Install frontend dependencies
44-
command: yarn install
45-
- save_cache:
46-
paths:
47-
- ~/.cache/yarn
48-
key: yarn-cache-{{ checksum "yarn.lock" }}
26+
name: Install frontend dependencies with Yarn
27+
command: yarn install --immutable
4928
- run:
5029
name: Build frontend
5130
command: yarn build

0 commit comments

Comments
 (0)
close