Skip to content

Commit

Permalink
ci: test, lint and build concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Aug 21, 2024
1 parent bbe779d commit b079bf7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@ jobs:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Setup golangci-lint
uses: golangci/[email protected]
- name: Run tests with Coverage
run: make coverage
- name: Upload Code Coverage
Expand All @@ -33,5 +29,24 @@ jobs:
name: codecov-deck
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

lint:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: golangci/[email protected]

build:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: make build
4 changes: 1 addition & 3 deletions tests/integration/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,7 @@ func reset(t *testing.T, opts ...string) {
args = append(args, opts...)
}
deckCmd.SetArgs(args)
if err := deckCmd.Execute(); err != nil {
t.Fatalf(err.Error(), "failed to reset Kong's state")
}
require.NoError(t, deckCmd.Execute(), "failed to reset Kong's state")
}

func readFile(filepath string) (string, error) {
Expand Down

0 comments on commit b079bf7

Please sign in to comment.