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

ci: add super-linter #41

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Run e2e tests

concurrency:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Lint Code Base

on:
pull_request:
branches: [main]

jobs:
build:
name: lint:required
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
statuses: write
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0

- name: Install cmake
run: sudo apt install cmake && cmake --version

- name: Lint Code Base
uses: super-linter/super-linter@v5
env:
DEFAULT_BRANCH: main
VALIDATE_RUST_2015: false # SL already lints 2018 and 2021
VALIDATE_NATURAL_LANGUAGE: false # needs custom config
VALIDATE_YAML: false # needs custom config
VALIDATE_GITLEAKS: false # needs custom config
FILTER_REGEX_EXCLUDE: 'e2e/bats.*'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/release-with-github.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Release with GitHub Action

permissions:
Expand Down Expand Up @@ -55,6 +56,7 @@ jobs:
else
cargo release version -p ${{ inputs.whichCrate }} ${{ inputs.semverBump }} &> cargo-release-output.txt
fi
# shellcheck disable=SC2002
cat cargo-release-output.txt
NEW_VERSION=$(grep -oP 'Upgrading .* from .* to \K[^\s]*' cargo-release-output.txt | tr -d ' ')
echo "$NEW_VERSION"
Expand Down
Loading