-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clean CI jobs, Makefile and go.mod/Dockerfile #350
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: fmtcheck | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
fmtcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: harden runner | ||
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 | ||
with: | ||
egress-policy: block | ||
disable-sudo: true | ||
allowed-endpoints: > | ||
github.com:443 | ||
- name: checkout code | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: setup go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version: 1.19 | ||
- name: check fmt | ||
run: 'bash -c "diff -u <(echo -n) <(gofmt -d .)"' |
This file was deleted.
Oops, something went wrong.
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,38 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: read # needed for only-new-issues option below | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: harden runner | ||
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 | ||
with: | ||
egress-policy: block | ||
disable-sudo: true | ||
allowed-endpoints: > | ||
github.com:443 | ||
api.github.com:443 | ||
raw.githubusercontent.com:443 | ||
objects.githubusercontent.com:443 | ||
- name: checkout code | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: setup go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version: 1.19 | ||
- name: lint | ||
uses: golangci/golangci-lint-action@639cd343e1d3b897ff35927a75193d57cfcba299 # v3.6.0 | ||
with: | ||
version: v1.53 | ||
args: --timeout=5m0s --verbose | ||
only-new-issues: true |
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,164 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
# see: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners | ||
jobs: | ||
# tier-1 | ||
# main development platform, gets features first and it's most tested | ||
ubuntu-latest: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: [ '1.19', '1.20'] | ||
steps: | ||
- name: harden runner | ||
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 | ||
with: | ||
egress-policy: block | ||
disable-sudo: true | ||
allowed-endpoints: > | ||
github.com:443 | ||
- name: checkout code | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: setup go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: run tests | ||
env: | ||
GHW_TESTING_SKIP_BLOCK: "1" | ||
GHW_TESTING_SKIP_GPU: "1" | ||
run: go test -v ./... | ||
|
||
ubuntu-2004: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
go: [ '1.18', '1.19'] | ||
steps: | ||
- name: harden runner | ||
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 | ||
with: | ||
egress-policy: block | ||
disable-sudo: true | ||
allowed-endpoints: > | ||
github.com:443 | ||
- name: checkout code | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: setup go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: run tests | ||
env: | ||
GHW_TESTING_SKIP_BLOCK: "1" | ||
GHW_TESTING_SKIP_GPU: "1" | ||
run: go test -v ./... | ||
|
||
windows-2022: | ||
runs-on: windows-2022 | ||
strategy: | ||
matrix: | ||
go: [ '1.19' ] | ||
steps: | ||
- name: harden runner | ||
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 | ||
with: | ||
egress-policy: block | ||
disable-sudo: true | ||
allowed-endpoints: > | ||
github.com:443 | ||
- name: checkout code | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: setup go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: run tests | ||
env: | ||
GHW_TESTING_SKIP_BLOCK: "1" | ||
GHW_TESTING_SKIP_GPU: "1" | ||
GHW_TESTING_SKIP_CPU: "1" | ||
GHW_TESTING_SKIP_MEMORY: "1" | ||
GHW_TESTING_SKIP_HOST: "1" | ||
GHW_TESTING_SKIP_NET: "1" | ||
GHW_TESTING_SKIP_PCI: "1" | ||
GHW_TESTING_SKIP_TOPOLOGY: "1" | ||
run: go test -v ./... | ||
|
||
windows-2019: | ||
runs-on: windows-2019 | ||
strategy: | ||
matrix: | ||
go: [ '1.18' ] | ||
steps: | ||
- name: harden runner | ||
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 | ||
with: | ||
egress-policy: block | ||
disable-sudo: true | ||
allowed-endpoints: > | ||
github.com:443 | ||
- name: checkout code | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: setup go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: run tests | ||
env: | ||
GHW_TESTING_SKIP_BLOCK: "1" | ||
GHW_TESTING_SKIP_GPU: "1" | ||
GHW_TESTING_SKIP_CPU: "1" | ||
GHW_TESTING_SKIP_MEMORY: "1" | ||
GHW_TESTING_SKIP_HOST: "1" | ||
GHW_TESTING_SKIP_NET: "1" | ||
GHW_TESTING_SKIP_PCI: "1" | ||
GHW_TESTING_SKIP_TOPOLOGY: "1" | ||
run: go test -v ./... | ||
|
||
# tier-2 | ||
# best-effort support, limited to most recent platforms (OS+go) | ||
|
||
# NOTE(jaypipes): We currently only support block information on MacOS, and | ||
# the tests have block skipped because we cannot get meaningful information | ||
# about the block devices in the Github Actions Runner virtual machines. So | ||
# this is really just a test of whether the library builds on MacOS 12. | ||
macos-12: | ||
runs-on: macos-12 | ||
strategy: | ||
matrix: | ||
go: [ '1.18' ] | ||
steps: | ||
- name: harden runner | ||
uses: step-security/harden-runner@55d479fb1c5bcad5a4f9099a5d9f37c8857b2845 # v2.4.1 | ||
with: | ||
egress-policy: block | ||
disable-sudo: true | ||
allowed-endpoints: > | ||
github.com:443 | ||
- name: checkout code | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- name: setup go | ||
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
- name: run tests | ||
env: | ||
GHW_TESTING_SKIP_BLOCK: "1" | ||
GHW_TESTING_SKIP_CPU: "1" | ||
GHW_TESTING_SKIP_GPU: "1" | ||
GHW_TESTING_SKIP_HOST: "1" | ||
GHW_TESTING_SKIP_MEMORY: "1" | ||
GHW_TESTING_SKIP_NET: "1" | ||
GHW_TESTING_SKIP_PCI: "1" | ||
GHW_TESTING_SKIP_TOPOLOGY: "1" | ||
run: go test -v ./... |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!