-
Notifications
You must be signed in to change notification settings - Fork 26
168 lines (142 loc) · 4.33 KB
/
check_push.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Check Push
on:
push:
branches: [ "main" ]
paths:
- ".github/workflows/check_push.yml"
- "lib/**"
- "lesson_02/quiz/**"
- "lesson_03/quiz/**"
- "lesson_06/expression/**"
- "lesson_07/conditionals/**"
- "lesson_09/types/**"
- "lesson_10/libraries/**"
- "lesson_11/arrays_java/**"
- "lesson_11/arrays_ts/**"
- "lesson_12/structs_java/**"
- "lesson_12/structs_ts/**"
- "lesson_13/maps_java/**"
- "lesson_13/maps_ts/**"
- "lesson_14/exceptions/**"
- "lesson_15/tdd/**"
- "lesson_16/objects/**"
- "lesson_17/bank/**"
- "lesson_26/api/**"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: "8.11.1"
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Build Shared Lib with Gradle Wrapper
working-directory: ./lib/java/codedifferently-instructional
run: ./gradlew check
- name: Build Shared Lib with Node.js
working-directory: ./lib/javascript/codedifferently-instructional
run: |
npm ci
npm run test
- name: Build Lesson 02 with Node.js
working-directory: ./lesson_02/quiz
run: |
npm ci
npm run compile
- name: Build Lesson 03 with Node.js
working-directory: ./lesson_03/quiz
run: |
npm ci
npm run compile
npm run lint
- name: Build Lesson 06 with Node.js
working-directory: ./lesson_06/expression
run: |
npm ci
npm run compile
- name: Build Lesson 07 with Node.js
working-directory: ./lesson_07/conditionals
run: |
npm ci
npm run compile
- name: Build Lesson 09 with Gradle
working-directory: ./lesson_09/types
run: ./gradlew check
- name: Build Lesson 10 with Node.js
working-directory: ./lesson_10/libraries
run: |
npm ci
npm run compile
- name: Build Lesson 11 with Java
working-directory: ./lesson_11/arrays_java
run: ./gradlew assemble
- name: Build Lesson 11 with Node.js
working-directory: ./lesson_11/arrays_ts
run: |
npm ci
npm run compile
- name: Build Lesson 12 with Java
working-directory: ./lesson_12/structs_java
run: ./gradlew assemble
- name: Build Lesson 12 with Node.js
working-directory: ./lesson_12/structs_ts
run: |
npm ci
npm run compile
- name: Build Lesson 13 with Java
working-directory: ./lesson_13/maps_java
run: ./gradlew assemble
- name: Build Lesson 13 with Node.js
working-directory: ./lesson_13/maps_ts
run: |
npm ci
npm run compile
- name: Build Lesson 14 with Java
working-directory: ./lesson_14/exceptions
run: ./gradlew assemble
- name: Build Lesson 15 with Java
working-directory: ./lesson_15/tdd
run: |
./gradlew assemble
./gradlew spotlessCheck
- name: Build Lesson 16 with Java
working-directory: ./lesson_16/objects
run: ./gradlew check
- name: Build Lesson 17 with Java
working-directory: ./lesson_17/bank
run: ./gradlew check
- name: Build Lesson 26 with Java
working-directory: ./lesson_26/api/java
run: ./gradlew assemble
- name: Build Lesson 26 with Node.js
working-directory: ./lesson_26/api/javascript/api_app
run: |
npm ci
npm run build
- name: Build Fullstack Demo with Java
working-directory: ./lib/java/fullstack_demo
env:
CLERK_PERISHABLE_KEY: 12345
CLERK_SECRET_KEY: 12345
run: ./gradlew check
- name: Test Fullstack Demo with Node.js
working-directory: ./lib/javascript/fullstack_demo
env:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }}
run: |
npm ci
npm run test