forked from smithy-lang/smithy-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (62 loc) · 1.83 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
name: Java ${{ matrix.java }}
strategy:
matrix:
java: [8, 11]
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'corretto'
- name: clean and build
run: ./gradlew clean build -Plog-tests
lint-typescript:
runs-on: ubuntu-latest
name: TypeScript Lint
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: cd smithy-typescript-ssdk-libs && yarn
- name: Run eslint
run: cd smithy-typescript-ssdk-libs && yarn lint
test-typescript:
runs-on: ubuntu-latest
name: TypeScript Test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: cd smithy-typescript-ssdk-libs && yarn
- name: Run tests
run: cd smithy-typescript-ssdk-libs && yarn test
ensure-typescript-formatted:
runs-on: ubuntu-latest
name: Ensure TypeScript is formatted
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: cd smithy-typescript-ssdk-libs && yarn
- name: Run the code formatter
run: cd smithy-typescript-ssdk-libs && yarn format
# This checks the output of git diff. If it's not empty (i.e there were
# changes) it'll return a non-zero error code.
- name: Ensure there are no changes from running the formatter
run: test -z "$(git diff)"