Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
1fd2270a
Commit
1fd2270a
authored
Oct 23, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: split circle test shell scripts
parent
48f384dc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
23 deletions
+36
-23
circle.yml
+2
-1
pkg/api/alerting.go
+1
-0
scripts/circle-test-backend.sh
+4
-18
scripts/circle-test-frontend.sh
+25
-0
scripts/grunt/options/exec.js
+4
-4
No files found.
circle.yml
View file @
1fd2270a
...
...
@@ -32,7 +32,8 @@ dependencies:
test
:
override
:
-
bash scripts/circle-test.sh
-
bash scripts/circle-test-frontend.sh
-
bash scripts/circle-test-backend.sh
deployment
:
gh_branch
:
...
...
pkg/api/alerting.go
View file @
1fd2270a
...
...
@@ -23,6 +23,7 @@ func ValidateOrgAlert(c *middleware.Context) {
c
.
JsonApiErr
(
403
,
"You are not allowed to edit/view alert"
,
nil
)
return
}
}
func
GetAlertStatesForDashboard
(
c
*
middleware
.
Context
)
Response
{
...
...
scripts/circle-test.sh
→
scripts/circle-test
-backend
.sh
View file @
1fd2270a
...
...
@@ -12,36 +12,22 @@ function exit_if_fail {
cd
/home/ubuntu/.go_workspace/src/github.com/grafana/grafana
rm
-rf
node_modules
npm install
-g
yarn
--quiet
yarn install
--pure-lockfile
--no-progress
exit_if_fail npm run
test
:coverage
exit_if_fail npm run build
# publish code coverage
echo
"Publishing javascript code coverage"
bash <
(
curl
-s
https://codecov.io/bash
)
-cF
javascript
rm
-rf
coverage
# npm install -g codecov
# codecov
# cat ./coverage/lcov.info | node ./node_modules/coveralls/bin/coveralls.js
echo
"running go fmt"
exit_if_fail
test
-z
"
$(
gofmt
-s
-l
./pkg | tee /dev/stderr
)
"
echo
"running go vet"
exit_if_fail
test
-z
"
$(
go vet ./pkg/... | tee /dev/stderr
)
"
echo
"building binaries"
exit_if_fail go run build.go build
cd
~/dev/go/src/github.com/grafana/grafana
echo
"building backend with install to cache pkgs"
exit_if_fail
time
go install ./pkg/cmd/grafana-server
echo
"running go test"
set
-e
echo
""
>
coverage.txt
for
d
in
$(
go list ./pkg/...
)
;
do
time
for
d
in
$(
go list ./pkg/...
)
;
do
exit_if_fail go
test
-coverprofile
=
profile.out
-covermode
=
atomic
$d
if
[
-f
profile.out
]
;
then
cat
profile.out
>>
coverage.txt
...
...
scripts/circle-test-frontend.sh
0 → 100755
View file @
1fd2270a
#!/bin/bash
function
exit_if_fail
{
command
=
$@
echo
"Executing '
$command
'"
eval
$command
rc
=
$?
if
[
$rc
-ne
0
]
;
then
echo
"'
$command
' returned
$rc
."
exit
$rc
fi
}
cd
/home/ubuntu/.go_workspace/src/github.com/grafana/grafana
rm
-rf
node_modules
npm install
-g
yarn
--quiet
yarn install
--pure-lockfile
--no-progress
exit_if_fail npm run
test
:coverage
exit_if_fail npm run build
# publish code coverage
echo
"Publishing javascript code coverage"
bash <
(
curl
-s
https://codecov.io/bash
)
-cF
javascript
rm
-rf
coverage
scripts/grunt/options/exec.js
View file @
1fd2270a
module
.
exports
=
function
(
config
,
grunt
)
{
'use strict'
'use strict'
;
var
coverage
=
''
;
if
(
config
.
coverage
)
{
...
...
@@ -7,8 +7,8 @@ module.exports = function(config, grunt) {
}
return
{
tslint
:
"node ./node_modules/tslint/lib/tslint-cli.js -c tslint.json --project ./tsconfig.json"
,
jest
:
"node ./node_modules/jest-cli/bin/jest.js "
+
coverage
,
"webpack"
:
"./node_modules/.bin/webpack --config scripts/webpack/webpack.prod.js"
,
tslint
:
'node ./node_modules/tslint/lib/tslint-cli.js -c tslint.json --project ./tsconfig.json'
,
jest
:
'node ./node_modules/jest-cli/bin/jest.js '
+
coverage
,
webpack
:
'./node_modules/.bin/webpack --config scripts/webpack/webpack.prod.js'
,
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment