-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aneesh Puttur <[email protected]>
- Loading branch information
Showing
2 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: Test linuxptp daemon | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.22.x | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: fmt | ||
run: IS_CONTAINER=yes make fmt | ||
|
||
- name: Build | ||
run: make all | ||
|
||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.22.x | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: test | ||
run: make test- | ||
|
||
modules: | ||
name: check go modules | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.22.x | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: check go modules are up to date | ||
run: make check-deps | ||
|
||
golangci: | ||
name: Golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.22.x | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.55.2 | ||
|
||
shellcheck: | ||
name: Shellcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run ShellCheck | ||
uses: ludeeus/action-shellcheck@master | ||
with: | ||
severity: error | ||
|
||
test-coverage: | ||
name: test-coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.22.x | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: test | ||
run: make test | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: lcov.out | ||
|