diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index ef2261f..999a44c 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -9,3 +9,8 @@ updates: directory: / schedule: interval: daily + + - package-ecosystem: gitsubmodule + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..048dad5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,18 @@ +name: Lint +on: + pull_request: + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.20.x + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + args: --timeout 5m0s --verbose diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a4c92d4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +name: Test +jobs: + test: + strategy: + matrix: + platform: [ubuntu-latest] + go-version: + - 1.20.x + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Test + run: go test ./... + env: + ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH: go1.20 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a749528 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +.PHONY: test +test: + go test ./... -v + +.PHONY: lint +lint: + golangci-lint run diff --git a/go.mod b/go.mod index d53fd5d..a178dc3 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/flanksource/is-healthy -go 1.19 +go 1.20 require ( github.com/gobwas/glob v0.2.3