-
Notifications
You must be signed in to change notification settings - Fork 6
141 lines (115 loc) · 3.27 KB
/
codegen_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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Smithy Ruby Codegen CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
java_version: 17
jobs:
generate-test-sdk:
name: Generate the test SDK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ env.java_version }}
- name: Build test SDK
working-directory: codegen
run:
./gradlew :smithy-ruby-codegen-test:build
- name: Upload generated test SDK
uses: actions/upload-artifact@v2
with:
name: white_label
path: codegen/smithy-ruby-codegen-test/build/smithyprojections/smithy-ruby-codegen-test/white-label/ruby-codegen/white_label
ruby-rbs-type-check:
needs: [generate-test-sdk]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.0', 3.1, 3.2]
steps:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/checkout@v2
- name: Build and install Hearth
run: |
gem build hearth.gemspec
gem install hearth-$(<VERSION).gem
working-directory: ./hearth
- name: Download generated test SDK
uses: actions/download-artifact@v2
with:
name: white_label
path: white_label
- name: Copy Gemfile
run: cp hearth/Gemfile white_label/
- name: Install gems
run: bundle install
working-directory: ./white_label
- name: Type checks
run: steep check
working-directory: ./white_label
ruby-integration-specs:
needs: [generate-test-sdk]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.0', 3.1, 3.2]
steps:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/checkout@v2
- name: Build and install Hearth
run: |
gem build hearth.gemspec
gem install hearth-$(<VERSION).gem
working-directory: ./hearth
- name: Download generated test SDK
uses: actions/download-artifact@v2
with:
name: white_label
path: white_label
- name: Copy Gemfile
run: cp hearth/Gemfile white_label/
- name: Install gems
run: bundle install
working-directory: ./white_label
- name: Integration specs
run: rspec
working-directory: ./white_label
codegen-rubocop:
runs-on: ubuntu-latest
steps:
- name: Setup Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
- uses: actions/checkout@v2
- name: Copy Gemfile and its dependencies
run: cp hearth/Gemfile hearth/hearth.gemspec hearth/VERSION codegen/
- name: Install gems
run: bundle install
working-directory: ./codegen
- name: Run rubocop
run: bundle exec rubocop -E -S
working-directory: ./codegen