Skip to content

Commit ced348c

Browse files
Add TypeScript CI
1 parent 97c1c11 commit ced348c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,46 @@ jobs:
2424

2525
- name: clean and build
2626
run: ./gradlew clean build -Plog-tests
27+
28+
lint-typescript:
29+
runs-on: ubuntu-latest
30+
name: TypeScript Lint
31+
steps:
32+
- uses: actions/checkout@v2
33+
- uses: actions/setup-node@v2
34+
with:
35+
node-version: '14'
36+
- name: Install dependencies
37+
run: cd smithy-typescript-ssdk-libs && yarn
38+
- name: Run eslint
39+
run: cd smithy-typescript-ssdk-libs && yarn lint
40+
41+
test-typescript:
42+
runs-on: ubuntu-latest
43+
name: TypeScript Test
44+
steps:
45+
- uses: actions/checkout@v2
46+
- uses: actions/setup-node@v2
47+
with:
48+
node-version: '14'
49+
- name: Install dependencies
50+
run: cd smithy-typescript-ssdk-libs && yarn
51+
- name: Run tests
52+
run: cd smithy-typescript-ssdk-libs && yarn test
53+
54+
ensure-typescript-formatted:
55+
runs-on: ubuntu-latest
56+
name: Ensure TypeScript is formatted
57+
steps:
58+
- uses: actions/checkout@v2
59+
- uses: actions/setup-node@v2
60+
with:
61+
node-version: '14'
62+
- name: Install dependencies
63+
run: cd smithy-typescript-ssdk-libs && yarn
64+
- name: Run the code formatter
65+
run: cd smithy-typescript-ssdk-libs && yarn format
66+
# This checks the output of git diff. If it's not empty (i.e there were
67+
# changes) it'll return a non-zero error code.
68+
- name: Ensure there are no changes from running the formatter
69+
run: test -z "$(git diff)"

0 commit comments

Comments
 (0)