tests/metrics_reporter: skip if license undefined #384
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
# Copyright 2020 Redpanda Data, Inc. | |
# | |
# Use of this software is governed by the Business Source License | |
# included in the file licenses/BSL.md | |
# | |
# As of the Change Date specified in that file, in accordance with | |
# the Business Source License, use of this software will be governed | |
# by the Apache License, Version 2.0 | |
name: Lint all codez | |
on: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
go: | |
name: Lint go files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.2 | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.49.0 | |
args: --timeout 5m | |
working-directory: src/go/rpk/ | |
- name: Install gofumpt | |
env: | |
GOFUMPT_VER: 0.4.0 | |
run: | | |
mkdir -v -p "$HOME/.local/bin" | |
wget -O "$HOME/.local/bin/gofumpt" "https://github.com/mvdan/gofumpt/releases/download/v${GOFUMPT_VER}/gofumpt_v${GOFUMPT_VER}_linux_amd64" | |
chmod 0700 "$HOME/.local/bin/gofumpt" | |
- name: Run gofumpt | |
run: | | |
find src/go -type f -name '*.go' | xargs -n1 gofumpt -w -lang=1.19 | |
git diff --exit-code | |
js: | |
name: Lint js files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install prettier | |
run: npm install [email protected] | |
- name: Run prettier | |
run: npx prettier --check 'src/**/*.{ts,js}' | |
py: | |
name: Lint python files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install yapf | |
run: pip install yapf==0.32.0 | |
- name: Run yapf | |
run: find . -type f -name '*.py' | xargs -n8 yapf -d | |
cpp: | |
name: Lint files with clang-format | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run clang-format | |
run: | | |
find . -type f -regex '.*\.\(cpp\|h\|hpp\|cc\|proto\|java\)' | xargs -n1 clang-format-14 -i -style=file -fallback-style=none | |
git diff --exit-code | |
sh: | |
name: Lint shell scripts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install shfmt | |
env: | |
SHFMT_VER: 3.6.0 | |
run: | | |
mkdir -v -p "$HOME/.local/bin" | |
wget -O "$HOME/.local/bin/shfmt" "https://github.com/mvdan/sh/releases/download/v${SHFMT_VER}/shfmt_v${SHFMT_VER}_linux_amd64" | |
chmod 0700 "$HOME/.local/bin/shfmt" | |
- name: Run shfmt | |
run: shfmt -i 2 -ci -s -d . |