Skip to content

Commit

Permalink
(ci) cancel previous and test fix via status code
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Dec 23, 2023
1 parent 6ded05c commit 8923179
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- '**/*.sum'
- '**/*.yml'
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
build:
strategy:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- '**/*.sum'
- '**/*.yml'
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
test:
strategy:
Expand Down
4 changes: 2 additions & 2 deletions pkg/line_chart_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ func TestGetLineChart(t *testing.T) {
},
{
QueryParams: `{"x": [["abc","2022-12-24","2023-12-25"], ["2022-12-23","2022-12-28","2023-12-30"]], "y": [[1,2,3], [2,5,3]]}`,
ExpectedStatus: http.StatusInternalServerError,
ExpectedStatus: http.StatusUnprocessableEntity,
},
{
QueryParams: `{"x": [[2022-12-23,"2022-12-24","2023-12-25"], ["2022-12-23","2022-12-28","2023-12-30"]], "y": [[1,2,3], [2,5,3]]}`,
ExpectedStatus: http.StatusInternalServerError,
ExpectedStatus: http.StatusUnprocessableEntity,
},
}

Expand Down

0 comments on commit 8923179

Please sign in to comment.