Skip to content

Commit

Permalink
Merge branch 'master' into readme-remove-develop+-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ojousima authored Feb 9, 2024
2 parents d56cc80 + 2778a3f commit 6cb15b5
Show file tree
Hide file tree
Showing 28 changed files with 689 additions and 306 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ceedling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
- name: Checkout submodules
run: git submodule update --init --recursive

- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: '3.0' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

# Runs a single command using the runners shell
- name: Install Ceedling
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/gh-pages-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,6 @@ jobs:
exit 1
fi
- name: Install PVS Studio
run: |
wget -q -O - https://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
sudo wget https://files.viva64.com/etc/viva64.list -O /etc/apt/sources.list.d/viva64.list
sudo apt-get update -qq && sudo apt-get install --assume-yes --quiet gcc-multilib && sudo apt-get install -qq
sudo apt-get install -qq pvs-studio
pvs-studio-analyzer credentials ${{ secrets.PVS_USERNAME }} ${{ secrets.PVS_KEY }}
- name: Run PVS Studio
run: make pvs

# Error if pvs.error has content
- name: Check PVS has no errors
run: |
if [[ $(wc -l <doxygen.error) -gt 1 ]]
then
cat pvs.error
exit 1
fi
- name: Install SSH Client 🔑
uses: webfactory/ssh-agent@v0.5.2
with:
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/pvs-check.yml

This file was deleted.

25 changes: 12 additions & 13 deletions .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ jobs:
- name: Checkout submodules
run: git submodule update --init --recursive

- name: Set up Sonar Scanner 4.40
run: |
export SONAR_SCANNER_VERSION=4.4.0.2170
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
echo "$SONAR_SCANNER_HOME/bin" >> $GITHUB_PATH
curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
# Setup java 17 to be default (sonar-scanner requirement as of 5.x)
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'

- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v2

- name: Download Nordic SDK
run: |
Expand All @@ -46,10 +44,11 @@ jobs:
- name: Compile project
run: build-wrapper-linux-x86-64 --out-dir bw-output make sonar

- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: '3.0' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

# Runs a single command using the runners shell
- name: Install Ceedling and GCovr
Expand Down
141 changes: 141 additions & 0 deletions reviewpad.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# This file is used to configure Reviewpad.
# The configuration is a proposal to help you get started.
# You can use it as a starting point and customize it to your needs.
# For more details see https://docs.reviewpad.com/guides/syntax.

# Define the list of labels to be used by Reviewpad.
# For more details see https://docs.reviewpad.com/guides/syntax#label.
labels:
small:
description: Pull request is small
color: "#76dbbe"
medium:
description: Pull request is medium
color: "#2986cc"
large:
description: Pull request is large
color: "#c90076"

# Define the list of workflows to be run by Reviewpad.
# A workflow is a list of actions that will be executed based on the defined rules.
# For more details see https://docs.reviewpad.com/guides/syntax#workflow.
workflows:
# This workflow praises contributors on their pull request contributions.
# This helps contributors feel appreciated.
- name: praise-contributors-on-milestones
description: Praise contributors based on their contributions
always-run: true
if:
# Praise contributors on their first pull request.
- rule: $pullRequestCountBy($author()) == 1
extra-actions:
- $commentOnce($sprintf("Thank you @%s for this first contribution!", [$author()]))
# Praise contributors on their 100th pull request.
- rule: $pullRequestCountBy($author()) == 100
extra-actions:
- $commentOnce($sprintf("Way to go 🎉 This is your 100th pull request!", [$author()]))

# This workflow validates that pull requests follow the conventional commits specification.
# This helps developers automatically generate changelogs.
# For more details, see https://www.conventionalcommits.org/en/v1.0.0/.
- name: check-conventional-commits
description: Validate that pull requests follow the conventional commits
always-run: true
if:
- rule: $isDraft() == false
then:
# Check commits messages against the conventional commits specification
- $commitLint()
# Check pull request title against the conventional commits specification.
- $titleLint()

# This workflow validates best practices for pull request management.
# This helps developers follow best practices.
- name: best-practices
description: Validate best practices for pull request management
always-run: true
if:
# Warn pull requests that do not have an associated GitHub issue.
- rule: $hasLinkedIssues() == false
extra-actions:
- $warn("Please link an issue to the pull request")
# Warn pull requests if their description is empty.
- rule: $description() == ""
extra-actions:
- $warn("Please provide a description for the pull request")
# Warn pull request do not have a clean linear history.
- rule: $hasLinearHistory() == false
extra-actions:
- $warn("Please rebase your pull request on the latest changes")

# This workflow labels pull requests based on the total number of lines changed.
# This helps pick pull requests based on their size and to incentivize small pull requests.
- name: size-labeling
description: Label pull request based on the number of lines changed
always-run: true
if:
- rule: $size() < 100
extra-actions:
- $removeLabels(["medium", "large"])
- $addLabel("small")
- rule: $size() >= 100 && $size() < 300
extra-actions:
- $removeLabels(["small", "large"])
- $addLabel("medium")
- rule: $size() >= 300
extra-actions:
- $removeLabels(["small", "medium"])
- $addLabel("large")

# This workflow assigns a random reviewer to pull requests.
# This helps guarantee that most pull requests are reviewed by at least one person.
- name: reviewer-assignment
description: Assign a reviewer to pull requests
always-run: true
if:
# Automatically assign a random reviewer when the pull request is ready for review;
- rule: $isDraft() == false
extra-actions:
- $assignRandomReviewer()

# This workflow signals pull requests waiting for reviews.
# This helps guarantee that pull requests are reviewed and approved by at least one person.
- name: check-approvals
description: Check that pull requests have the required number of approvals
always-run: true
if:
# Label pull requests with `waiting-for-review` if there are no approvals;
- rule: $isDraft() == false && $approvalsCount() < 1
extra-actions:
- $addLabel("waiting-for-review")

# This workflow labels pull requests based on the pull request change type.
# This helps pick pull requests based on their change type.
- name: change-type-labelling
description: Label pull requests based on the type of changes
always-run: true
if:
# Label pull requests with `docs` if they only modify Markdown or txt files.
- rule: $hasFileExtensions([".md", ".txt"])
extra-actions:
- $addLabel("docs")
# Label pull requests with `infra` if they modify Terraform files.
- rule: $hasFileExtensions([".tf"])
extra-actions:
- $addLabel("infra")
# Label pull requests with `dependencies` if they only modify `package.json` and `package.lock` files.
- rule: $hasFileExtensions(["package.json", "package-lock.json"])
extra-actions:
- $addLabel("dependencies")


# This workflow validates that pull requests do not contain changes to the license.
# This helps avoid unwanted license modifications.
- name: license-validation
description: Validate that licenses are not modified
always-run: true
if:
# Fail Reviewpad check on pull requests that modify any LICENSE;
- rule: $hasFilePattern("**/LICENSE*")
extra-actions:
- $fail("License files cannot be modified")
Loading

0 comments on commit 6cb15b5

Please sign in to comment.