Skip to content

Commit 16b0beb

Browse files
authored
Migrate Travis CI to GitHub Actions (#312)
* Add GitHub Actions build on pull requests * Fix code styles * Migrate Travis CI to GitHub Actions * Loosen DNS failure check in test
1 parent d0acc4f commit 16b0beb

File tree

4 files changed

+33
-15
lines changed

4 files changed

+33
-15
lines changed

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node: [ '10', '12', '14', '16' ]
13+
fail-fast: false
14+
15+
name: Node.js ${{ matrix.node }}
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: ${{ matrix.node }}
23+
cache: 'npm'
24+
- name: Install Dependency
25+
run: npm ci
26+
- name: Test Project
27+
run: npm test
28+

.travis.yml

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

lib/types.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,23 +1653,22 @@ type FlexTextBase = {
16531653
* The default value is `none`.
16541654
*/
16551655
decoration?: string;
1656-
}
1656+
};
16571657

16581658
type FlexTextWithText = FlexTextBase & {
16591659
text: string;
16601660
contents?: never;
1661-
}
1661+
};
16621662

16631663
type FlexTextWithContents = FlexTextBase & {
16641664
/**
16651665
* Array of spans. Be sure to set either one of the `text` property or `contents` property. If you set the `contents` property, `text` is ignored.
16661666
*/
16671667
contents: FlexSpan[];
16681668
text?: never;
1669-
}
1669+
};
16701670

1671-
export type FlexText = (FlexTextWithText | FlexTextWithContents) &
1672-
Offset;
1671+
export type FlexText = (FlexTextWithText | FlexTextWithContents) & Offset;
16731672

16741673
/**
16751674
* This component renders multiple text strings with different designs in one row. You can specify the color, size, weight, and decoration for the font. Span is set to `contents` property in [Text](https://developers.line.biz/en/reference/messaging-api/#f-text).

test/http.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ describe("http", () => {
185185
ok(false);
186186
} catch (err) {
187187
ok(err instanceof RequestError);
188-
equal(err.code, "ENOTFOUND");
188+
ok(["EAI_AGAIN", "ENOTFOUND"].includes(err.code));
189189
nock.disableNetConnect();
190190
}
191191
});

0 commit comments

Comments
 (0)