Skip to content

Commit 6cb15b5

Browse files
authoredFeb 9, 2024
Merge branch 'master' into readme-remove-develop+-beta
2 parents d56cc80 + 2778a3f commit 6cb15b5

28 files changed

+689
-306
lines changed
 

‎.github/workflows/ceedling.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ jobs:
2525
- name: Checkout submodules
2626
run: git submodule update --init --recursive
2727

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

3334
# Runs a single command using the runners shell
3435
- name: Install Ceedling

‎.github/workflows/gh-pages-push.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,6 @@ jobs:
4040
exit 1
4141
fi
4242
43-
- name: Install PVS Studio
44-
run: |
45-
wget -q -O - https://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
46-
sudo wget https://files.viva64.com/etc/viva64.list -O /etc/apt/sources.list.d/viva64.list
47-
sudo apt-get update -qq && sudo apt-get install --assume-yes --quiet gcc-multilib && sudo apt-get install -qq
48-
sudo apt-get install -qq pvs-studio
49-
pvs-studio-analyzer credentials ${{ secrets.PVS_USERNAME }} ${{ secrets.PVS_KEY }}
50-
51-
- name: Run PVS Studio
52-
run: make pvs
53-
54-
# Error if pvs.error has content
55-
- name: Check PVS has no errors
56-
run: |
57-
if [[ $(wc -l <doxygen.error) -gt 1 ]]
58-
then
59-
cat pvs.error
60-
exit 1
61-
fi
62-
6343
- name: Install SSH Client 🔑
6444
uses: webfactory/ssh-agent@v0.5.2
6545
with:

‎.github/workflows/pvs-check.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

‎.github/workflows/sonar-scan.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,14 @@ jobs:
2424
- name: Checkout submodules
2525
run: git submodule update --init --recursive
2626

27-
- name: Set up Sonar Scanner 4.40
28-
run: |
29-
export SONAR_SCANNER_VERSION=4.4.0.2170
30-
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
31-
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
32-
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
33-
echo "$SONAR_SCANNER_HOME/bin" >> $GITHUB_PATH
34-
curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
35-
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
36-
echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
27+
# Setup java 17 to be default (sonar-scanner requirement as of 5.x)
28+
- uses: actions/setup-java@v3
29+
with:
30+
distribution: 'temurin' # See 'Supported distributions' for available options
31+
java-version: '17'
32+
33+
- name: Install sonar-scanner and build-wrapper
34+
uses: sonarsource/sonarcloud-github-c-cpp@v2
3735

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

49-
- name: Set up Ruby 2.6
50-
uses: actions/setup-ruby@v1
47+
- name: Set up Ruby
48+
uses: ruby/setup-ruby@v1
5149
with:
52-
ruby-version: 2.6
50+
ruby-version: '3.0' # Not needed with a .ruby-version file
51+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
5352

5453
# Runs a single command using the runners shell
5554
- name: Install Ceedling and GCovr

‎reviewpad.yml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# This file is used to configure Reviewpad.
2+
# The configuration is a proposal to help you get started.
3+
# You can use it as a starting point and customize it to your needs.
4+
# For more details see https://docs.reviewpad.com/guides/syntax.
5+
6+
# Define the list of labels to be used by Reviewpad.
7+
# For more details see https://docs.reviewpad.com/guides/syntax#label.
8+
labels:
9+
small:
10+
description: Pull request is small
11+
color: "#76dbbe"
12+
medium:
13+
description: Pull request is medium
14+
color: "#2986cc"
15+
large:
16+
description: Pull request is large
17+
color: "#c90076"
18+
19+
# Define the list of workflows to be run by Reviewpad.
20+
# A workflow is a list of actions that will be executed based on the defined rules.
21+
# For more details see https://docs.reviewpad.com/guides/syntax#workflow.
22+
workflows:
23+
# This workflow praises contributors on their pull request contributions.
24+
# This helps contributors feel appreciated.
25+
- name: praise-contributors-on-milestones
26+
description: Praise contributors based on their contributions
27+
always-run: true
28+
if:
29+
# Praise contributors on their first pull request.
30+
- rule: $pullRequestCountBy($author()) == 1
31+
extra-actions:
32+
- $commentOnce($sprintf("Thank you @%s for this first contribution!", [$author()]))
33+
# Praise contributors on their 100th pull request.
34+
- rule: $pullRequestCountBy($author()) == 100
35+
extra-actions:
36+
- $commentOnce($sprintf("Way to go 🎉 This is your 100th pull request!", [$author()]))
37+
38+
# This workflow validates that pull requests follow the conventional commits specification.
39+
# This helps developers automatically generate changelogs.
40+
# For more details, see https://www.conventionalcommits.org/en/v1.0.0/.
41+
- name: check-conventional-commits
42+
description: Validate that pull requests follow the conventional commits
43+
always-run: true
44+
if:
45+
- rule: $isDraft() == false
46+
then:
47+
# Check commits messages against the conventional commits specification
48+
- $commitLint()
49+
# Check pull request title against the conventional commits specification.
50+
- $titleLint()
51+
52+
# This workflow validates best practices for pull request management.
53+
# This helps developers follow best practices.
54+
- name: best-practices
55+
description: Validate best practices for pull request management
56+
always-run: true
57+
if:
58+
# Warn pull requests that do not have an associated GitHub issue.
59+
- rule: $hasLinkedIssues() == false
60+
extra-actions:
61+
- $warn("Please link an issue to the pull request")
62+
# Warn pull requests if their description is empty.
63+
- rule: $description() == ""
64+
extra-actions:
65+
- $warn("Please provide a description for the pull request")
66+
# Warn pull request do not have a clean linear history.
67+
- rule: $hasLinearHistory() == false
68+
extra-actions:
69+
- $warn("Please rebase your pull request on the latest changes")
70+
71+
# This workflow labels pull requests based on the total number of lines changed.
72+
# This helps pick pull requests based on their size and to incentivize small pull requests.
73+
- name: size-labeling
74+
description: Label pull request based on the number of lines changed
75+
always-run: true
76+
if:
77+
- rule: $size() < 100
78+
extra-actions:
79+
- $removeLabels(["medium", "large"])
80+
- $addLabel("small")
81+
- rule: $size() >= 100 && $size() < 300
82+
extra-actions:
83+
- $removeLabels(["small", "large"])
84+
- $addLabel("medium")
85+
- rule: $size() >= 300
86+
extra-actions:
87+
- $removeLabels(["small", "medium"])
88+
- $addLabel("large")
89+
90+
# This workflow assigns a random reviewer to pull requests.
91+
# This helps guarantee that most pull requests are reviewed by at least one person.
92+
- name: reviewer-assignment
93+
description: Assign a reviewer to pull requests
94+
always-run: true
95+
if:
96+
# Automatically assign a random reviewer when the pull request is ready for review;
97+
- rule: $isDraft() == false
98+
extra-actions:
99+
- $assignRandomReviewer()
100+
101+
# This workflow signals pull requests waiting for reviews.
102+
# This helps guarantee that pull requests are reviewed and approved by at least one person.
103+
- name: check-approvals
104+
description: Check that pull requests have the required number of approvals
105+
always-run: true
106+
if:
107+
# Label pull requests with `waiting-for-review` if there are no approvals;
108+
- rule: $isDraft() == false && $approvalsCount() < 1
109+
extra-actions:
110+
- $addLabel("waiting-for-review")
111+
112+
# This workflow labels pull requests based on the pull request change type.
113+
# This helps pick pull requests based on their change type.
114+
- name: change-type-labelling
115+
description: Label pull requests based on the type of changes
116+
always-run: true
117+
if:
118+
# Label pull requests with `docs` if they only modify Markdown or txt files.
119+
- rule: $hasFileExtensions([".md", ".txt"])
120+
extra-actions:
121+
- $addLabel("docs")
122+
# Label pull requests with `infra` if they modify Terraform files.
123+
- rule: $hasFileExtensions([".tf"])
124+
extra-actions:
125+
- $addLabel("infra")
126+
# Label pull requests with `dependencies` if they only modify `package.json` and `package.lock` files.
127+
- rule: $hasFileExtensions(["package.json", "package-lock.json"])
128+
extra-actions:
129+
- $addLabel("dependencies")
130+
131+
132+
# This workflow validates that pull requests do not contain changes to the license.
133+
# This helps avoid unwanted license modifications.
134+
- name: license-validation
135+
description: Validate that licenses are not modified
136+
always-run: true
137+
if:
138+
# Fail Reviewpad check on pull requests that modify any LICENSE;
139+
- rule: $hasFilePattern("**/LICENSE*")
140+
extra-actions:
141+
- $fail("License files cannot be modified")

0 commit comments

Comments
 (0)