Skip to content

Commit b1c08f3

Browse files
author
Qinghao Shi
authored
Merge pull request #1479 from jamesbeyond/gha
Migrate TravisCI to GHA
2 parents 4a6bbbb + 2d5733b commit b1c08f3

File tree

4 files changed

+47
-110
lines changed

4 files changed

+47
-110
lines changed

.github/workflows/snippets_checks.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow performs the checks like license check,
2+
# doxygen, unit tests etc.
3+
name: Snippets Checks
4+
5+
on:
6+
pull_request:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- development
11+
12+
jobs:
13+
Snippets-check:
14+
runs-on: ubuntu-latest
15+
container:
16+
image: ghcr.io/armmbed/mbed-os-env:master-latest
17+
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v2
21+
22+
- name: clone mbed-os
23+
run: git clone https://github.com/armmbed/mbed-os.git
24+
25+
- name: add mbed_app.json
26+
run: |
27+
echo '{ "target_overrides": { "K64F": { "target.features_add": ["BLE"] } } }' > mbed_app.json
28+
29+
- name: validate code snippets
30+
run: ./check_tools/find_bad_code_snippets.sh
31+
32+
- name: find remaining TODOs
33+
run: |
34+
TODO_COUNT=0
35+
for f in $(find -name mbed-os -prune -o -name '*.md' -print)
36+
do
37+
for l in $(sed -n '/```.*TODO/I=' $f)
38+
do
39+
echo "TODO in $f line $l"
40+
TODO_COUNT=$(expr $TODO_COUNT + 1)
41+
done
42+
done
43+
echo "Total number of TODOs: $TODO_COUNT"

.travis.yml

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

docs/api/connectivity/bluetooth/BLE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ the events (methods) you are interested in, the others will inherit the do-nothi
4747

4848
All BLE operations are executed on an instance of BLE accessible through a function in the header `ble/BLE.h`.
4949

50-
```c
50+
```cpp
5151
#include "ble/BLE.h"
5252

5353
BLE& mydevicename = BLE::Instance();

docs/api/drivers/driver_interfaces.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class LEDAnimator {
7272
}
7373

7474
LEDAnimator(mbed::interface::DigitalOut *red, mbed::interface::DigitalOut *green, mbed::interface::DigitalOut *blue) : _red(red), _green(green), _blue(blue), _internally_created(false) {
75-
...
75+
// do something
7676
}
7777

7878
~LEDAnimator() {
@@ -90,7 +90,7 @@ private:
9090
mbed::interface::DigitalOut *_blue;
9191

9292
bool _internally_created;
93-
}
93+
};
9494
```
9595
9696
Now it is possible for your existing library to use the external GPIO expander without any knowledge that it is external. As long as your `my_company::I2CExpander::DigitalOut` class implements the `mbed::interface::DigitalOut` interface properly, your code will work as it did before. You can even have some of the GPIO be internal or external if your design calls for it!
@@ -103,7 +103,7 @@ The inheritance of a driver from the new driver interface is conditional upon `F
103103
104104
When `FEATURE_EXPERIMENTAL_API` is disabled, the following type alias is made instead:
105105
106-
```c++
106+
```
107107
using mbed::interface::DigitalOut = mbed::DigitalOut;
108108
```
109109

0 commit comments

Comments
 (0)