Skip to content

Commit

Permalink
Merge pull request #20 from AppleGamer22/feature/pid_duration_required
Browse files Browse the repository at this point in the history
feat: cobra checks that pid and duration are both provided
  • Loading branch information
AppleGamer22 authored Jun 21, 2022
2 parents 47957c9 + a1c6909 commit 0724142
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 22 deletions.
1 change: 0 additions & 1 deletion .github/dependency-review.yml

This file was deleted.

23 changes: 9 additions & 14 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,30 @@ on:
pull_request:
types:
- opened
- reopened
- closed
- reopened
workflow_dispatch:
inputs: {}
jobs:
analyze:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
name: Analyze
runs-on: ${{matrix.os}}
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Pull Source Code
uses: actions/checkout@v3.0.2
uses: actions/checkout@v3
- name: Set-up Go
uses: actions/setup-go@v3.2.0
uses: actions/setup-go@v3
with:
go-version: "1.17.8"
go-version: "1.18.3"
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
- name: Build
run: make debug
run: make server
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v2
19 changes: 19 additions & 0 deletions .github/workflows/dependency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Dependency Review
on:
pull_request:
types:
- opened
- closed
- reopened
permissions:
contents: read
jobs:
dependency:
runs-on: ubuntu-latest
steps:
- name: Pull Source Code
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v2
with:
fail-on-severity: low
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,3 @@ jobs:
go-version: "1.17.7"
- name: Test
run: make test
dependency_review:
runs-on: ubuntu-latest
steps:
- name: Pull Source Code
uses: actions/checkout@v3.0.2
- name: Dependency Review
uses: actions/dependency-review-action@v2
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ var RootCommand = &cobra.Command{
func init() {
RootCommand.Flags().DurationVarP(&duration, "duration", "d", 0, "duration with units ns, us (or µs), ms, s, m, h")
RootCommand.Flags().IntVarP(&pid, "pid", "p", 0, "process ID")
RootCommand.MarkFlagsRequiredTogether("pid", "duration")
RootCommand.SetVersionTemplate("{{.Version}}\n")
}

0 comments on commit 0724142

Please sign in to comment.