Skip to content
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

chore(lint): Fix super linter (again) #14

Merged
merged 30 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
429fef5
chore(lint): satisfy gitleaks
MaxMustermann2 Mar 11, 2024
11eac64
chore(lint): placate YAML linter
MaxMustermann2 Mar 11, 2024
1cf2f59
chore(lint): activate Docker / IAAS linter
MaxMustermann2 Mar 11, 2024
de462ac
chore(lint): placate shellcheck
MaxMustermann2 Mar 11, 2024
26a7051
chore(lint): placate markdownlint
MaxMustermann2 Mar 11, 2024
3c3a535
chore(lint): placate markdownlint from `lint.yml`
MaxMustermann2 Mar 11, 2024
d8cf731
build: use test keyring in localnet
MaxMustermann2 Mar 11, 2024
5d99bf8
chore(lint): merge docker RUN statements
MaxMustermann2 Mar 11, 2024
73e27d3
fix(localnet): remove seed URL upon init
MaxMustermann2 Mar 11, 2024
2fa89d0
chore(lint): some lint suggestions for Dockerfile
MaxMustermann2 Mar 11, 2024
6c1dbbe
chore(lint): apply shfmt
MaxMustermann2 Mar 11, 2024
2f597f5
chore(lint): add docker healthcheck and user
MaxMustermann2 Mar 11, 2024
5d0dde2
chore(build): update release go version to 1.21
MaxMustermann2 Mar 11, 2024
078c423
chore(ci): add permissions to workflows
MaxMustermann2 Mar 11, 2024
72b459a
chore(ci): skip generated files
MaxMustermann2 Mar 11, 2024
82134b5
chore(ci): placate yaml linter
MaxMustermann2 Mar 11, 2024
e2a3a05
chore(ci): use correct argument name for checkov
MaxMustermann2 Mar 11, 2024
7b8b579
chore(ci): add top level permissions to codeql
MaxMustermann2 Mar 11, 2024
4b02492
chore(ci): add json super linter to match develop
MaxMustermann2 Mar 11, 2024
40d7f25
chore(ci): disable JSON super linter
MaxMustermann2 Mar 11, 2024
1e8edad
chore(lint): trigger lint workflows with comment
MaxMustermann2 Mar 11, 2024
c09f986
chore(deps): upgrade protobuf to 1.33.0
MaxMustermann2 Mar 11, 2024
d403e8c
Revert "chore(deps): upgrade protobuf to 1.33.0"
MaxMustermann2 Mar 11, 2024
da20a21
chore(deps): update protobuf
MaxMustermann2 Mar 11, 2024
b162a7f
chore(ci): coverage badge comment on PR
MaxMustermann2 Mar 11, 2024
27b3515
chore(build): exclude testutil from coverage
MaxMustermann2 Mar 11, 2024
5b482d5
chore(ci): add test coverage commenting workflow
MaxMustermann2 Mar 11, 2024
545f29e
chore(ci): use step output instead of env
MaxMustermann2 Mar 11, 2024
cb43907
chore(ci): add commit hash in test comment
MaxMustermann2 Mar 11, 2024
721283d
chore(ci): remove deprecated output
MaxMustermann2 Mar 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .checkov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
skip-path:
# auto generated
- client/docs
3 changes: 3 additions & 0 deletions .github/workflows/ante-benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: AnteHandler Benchmark Tests

permissions:
contents: read

on:
push:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
#
name: "CodeQL"

permissions:
actions: read
contents: read
security-events: write

on:
push:
branches: [develop, main, master]
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/consensuswarn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ on:
- edited
- synchronize

permissions:
contents: read
pull-requests: write

jobs:
main:
permissions:
contents: read
pull-requests: write # For reading the PR and posting comment
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e-test-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: E2E Test Release

permissions:
contents: read

on:
pull_request:
branches:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: E2E Test

permissions:
contents: read

on:
pull_request:
branches:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: goreleaser

permissions:
# github releases
contents: write

on:
push:
tags:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "Pull Request Labeler"

permissions:
contents: read
pull-requests: write

on:
pull_request_target:

Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/markdown-links.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Check Markdown links
on:

permissions:
contents: read

on:
pull_request:
paths:
- '**.md'
Expand All @@ -10,6 +14,9 @@ on:
- master
paths:
- '**.md'
# runs every monday at 9 am
schedule:
- cron: "0 9 * * 1"

jobs:
markdown-link-check:
Expand All @@ -18,7 +25,5 @@ jobs:
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@master
with:
check-modified-files-only: "yes"
use-quiet-mode: "yes"
base-branch: "main"
config-file: "mlc_config.json"
3 changes: 3 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
paths:
- "proto/**"

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ on:
- main
- master

permissions:
contents: read
security-events: write

jobs:
Gosec:
permissions:
contents: read
security-events: write

runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Semgrep
permissions:
contents: read
on:
# Scan changed files in PRs, block on new issues only (existing issues ignored)
pull_request: {}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- main
- master

permissions:
contents: read
security-events: write

jobs:
analyze:
# disabled for now, since we don't have any Solidity files.
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/solhint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Solhint
# This workflow is only run when a .sol file has been changed
# This workflow is only run when a file in the contracts folder changes.
on:
pull_request:
paths:
- "contracts/**"

permissions:
contents: read

jobs:
solhint:
name: runner / solhint
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/solidity-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- master
- release/**

permissions:
contents: read

jobs:
test-solidity:
# disabled for now, since we don't have any Solidity files.
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ on:
schedule:
- cron: "0 0 * * *"

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
---
name: Lint Code Base

permissions:
contents: read

on:
push:
branches: ["develop", "main", "master"]
Expand All @@ -33,9 +36,10 @@ jobs:
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_OPENAPI: false
VALIDATE_JSCPD: false
# The JSON files in the repo are generated (abis or swagger)
# or are linting files. So this can be safely disabled.
VALIDATE_JSON: false
# separate workflow
VALIDATE_GO: false
VALIDATE_GO_MODULES: false
# TODO: enable docker coverage later
VALIDATE_CHECKOV: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39 changes: 31 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: Tests
on:
pull_request:
# for write permission, use pull_request_target and not pull_request.
pull_request_target:
push:
branches:
- develop
- main
- master
- release/**

permissions:
contents: write
pull-requests: write

# Automatically cancel run if another commit to the same ref is detected.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -29,14 +34,32 @@ jobs:
**/**.go
go.mod
go.sum
- name: Test and Create Coverage Report
- name: Test and create coverage report
run: |
make test-unit-cover
if: env.GIT_DIFF
- uses: codecov/codecov-action@v3
# disabled for now, since we don't have any codecov
if: ${{ false }}
- name: Check if test coverage is above threshold
id: output-coverage
uses: vladopajic/go-test-coverage@v2
with:
profile: cover.out
local-prefix: github.com/ExocoreNetwork/exocore
# TODO: increase this threshold with time to 80
threshold-total: 10
if: env.GIT_DIFF
- name: Find comment
id: find-comment
uses: peter-evans/find-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
if: env.GIT_DIFF && github.event_name == 'pull_request'
- name: Comment coverage on PR
uses: peter-evans/create-or-update-comment@v3
with:
file: ./coverage.txt
fail_ci_if_error: true
# if: env.GIT_DIFF
issue-number: ${{ github.event.pull_request.number }}
comment-id: ${{ steps.find-comment.outputs.comment-id }}
body: |
Coverage as of ${{ github.sha }}: ${{ steps.output-coverage.outputs.total-coverage }}%
edit-mode: append
if: env.GIT_DIFF && github.event_name == 'pull_request'
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ localnet-setup
.testnets

# Testing
coverage.txt
*.out
sim_log_file
tests/**/tmp/*
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ issues:
# however, other linters have not yet caught up.
- text: 'leading space'
linters:
- nolintlint
- nolintlint
Loading
Loading