|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ main, master ] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build-02-selenium-overview: |
| 9 | + name: "Section 02: Selenium Overview" |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v5 |
| 14 | + |
| 15 | + - name: Set up JDK 25 |
| 16 | + uses: actions/setup-java@v5 |
| 17 | + with: |
| 18 | + java-version: '25' |
| 19 | + distribution: 'temurin' |
| 20 | + cache: 'maven' |
| 21 | + |
| 22 | + - name: Build all projects in section |
| 23 | + run: | |
| 24 | + set -e |
| 25 | + echo "Building Section 02: Selenium Overview" |
| 26 | + find 02-selenium-overview -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 27 | + echo "Building $(dirname $pom)" |
| 28 | + mvn clean compile -B -f "$pom" || { |
| 29 | + echo "Failed to compile $pom" |
| 30 | + exit 1 |
| 31 | + } |
| 32 | + done |
| 33 | + echo "Section 02 completed successfully" |
| 34 | +
|
| 35 | + build-03-selenium-quick-start: |
| 36 | + name: "Section 03: Selenium Quick Start" |
| 37 | + runs-on: ubuntu-latest |
| 38 | + |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v5 |
| 41 | + |
| 42 | + - name: Set up JDK 25 |
| 43 | + uses: actions/setup-java@v5 |
| 44 | + with: |
| 45 | + java-version: '25' |
| 46 | + distribution: 'temurin' |
| 47 | + cache: 'maven' |
| 48 | + |
| 49 | + - name: Build all projects in section |
| 50 | + run: | |
| 51 | + set -e |
| 52 | + echo "Building Section 03: Selenium Quick Start" |
| 53 | + find 03-selenium-quick-start -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 54 | + echo "Building $(dirname $pom)" |
| 55 | + mvn clean compile -B -f "$pom" || { |
| 56 | + echo "Failed to compile $pom" |
| 57 | + exit 1 |
| 58 | + } |
| 59 | + done |
| 60 | + echo "Section 03 completed successfully" |
| 61 | +
|
| 62 | + build-04-selenium-actions: |
| 63 | + name: "Section 04: Selenium Actions" |
| 64 | + runs-on: ubuntu-latest |
| 65 | + |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v5 |
| 68 | + |
| 69 | + - name: Set up JDK 25 |
| 70 | + uses: actions/setup-java@v5 |
| 71 | + with: |
| 72 | + java-version: '25' |
| 73 | + distribution: 'temurin' |
| 74 | + cache: 'maven' |
| 75 | + |
| 76 | + - name: Build all projects in section |
| 77 | + run: | |
| 78 | + set -e |
| 79 | + echo "Building Section 04: Selenium Actions" |
| 80 | + find 04-selenium-actions -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 81 | + echo "Building $(dirname $pom)" |
| 82 | + mvn clean compile -B -f "$pom" || { |
| 83 | + echo "Failed to compile $pom" |
| 84 | + exit 1 |
| 85 | + } |
| 86 | + done |
| 87 | + echo "Section 04 completed successfully" |
| 88 | +
|
| 89 | + build-05-selenium-waiting-mechanisms: |
| 90 | + name: "Section 05: Selenium Waiting Mechanisms" |
| 91 | + runs-on: ubuntu-latest |
| 92 | + |
| 93 | + steps: |
| 94 | + - uses: actions/checkout@v5 |
| 95 | + |
| 96 | + - name: Set up JDK 25 |
| 97 | + uses: actions/setup-java@v5 |
| 98 | + with: |
| 99 | + java-version: '25' |
| 100 | + distribution: 'temurin' |
| 101 | + cache: 'maven' |
| 102 | + |
| 103 | + - name: Build all projects in section |
| 104 | + run: | |
| 105 | + set -e |
| 106 | + echo "Building Section 05: Selenium Waiting Mechanisms" |
| 107 | + find 05-selenium-waiting-mechanisms -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 108 | + echo "Building $(dirname $pom)" |
| 109 | + mvn clean compile -B -f "$pom" || { |
| 110 | + echo "Failed to compile $pom" |
| 111 | + exit 1 |
| 112 | + } |
| 113 | + done |
| 114 | + echo "Section 05 completed successfully" |
| 115 | +
|
| 116 | + build-06-managing-chrome-options: |
| 117 | + name: "Section 06: Managing Chrome Options - Cookies - Browser" |
| 118 | + runs-on: ubuntu-latest |
| 119 | + |
| 120 | + steps: |
| 121 | + - uses: actions/checkout@v5 |
| 122 | + |
| 123 | + - name: Set up JDK 25 |
| 124 | + uses: actions/setup-java@v5 |
| 125 | + with: |
| 126 | + java-version: '25' |
| 127 | + distribution: 'temurin' |
| 128 | + cache: 'maven' |
| 129 | + |
| 130 | + - name: Build all projects in section |
| 131 | + run: | |
| 132 | + set -e |
| 133 | + echo "Building Section 06: Managing Chrome Options - Cookies - Browser" |
| 134 | + find 06-managing-chrome-options-cookies-browser -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 135 | + echo "Building $(dirname $pom)" |
| 136 | + mvn clean compile -B -f "$pom" || { |
| 137 | + echo "Failed to compile $pom" |
| 138 | + exit 1 |
| 139 | + } |
| 140 | + done |
| 141 | + echo "Section 06 completed successfully" |
| 142 | +
|
| 143 | + build-07-locators: |
| 144 | + name: "Section 07: Locators and Real-Time Challenges in Detail" |
| 145 | + runs-on: ubuntu-latest |
| 146 | + |
| 147 | + steps: |
| 148 | + - uses: actions/checkout@v5 |
| 149 | + |
| 150 | + - name: Set up JDK 25 |
| 151 | + uses: actions/setup-java@v5 |
| 152 | + with: |
| 153 | + java-version: '25' |
| 154 | + distribution: 'temurin' |
| 155 | + cache: 'maven' |
| 156 | + |
| 157 | + - name: Build all projects in section |
| 158 | + run: | |
| 159 | + set -e |
| 160 | + echo "Building Section 07: Locators and Real-Time Challenges in Detail" |
| 161 | + find 07-locators-real-time-challenges-in-detail -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 162 | + echo "Building $(dirname $pom)" |
| 163 | + mvn clean compile -B -f "$pom" || { |
| 164 | + echo "Failed to compile $pom" |
| 165 | + exit 1 |
| 166 | + } |
| 167 | + done |
| 168 | + echo "Section 07 completed successfully" |
| 169 | +
|
| 170 | + build-08-selenium-40-features: |
| 171 | + name: "Section 08: Selenium 4.0 Features" |
| 172 | + runs-on: ubuntu-latest |
| 173 | + |
| 174 | + steps: |
| 175 | + - uses: actions/checkout@v5 |
| 176 | + |
| 177 | + - name: Set up JDK 25 |
| 178 | + uses: actions/setup-java@v5 |
| 179 | + with: |
| 180 | + java-version: '25' |
| 181 | + distribution: 'temurin' |
| 182 | + cache: 'maven' |
| 183 | + |
| 184 | + - name: Build all projects in section |
| 185 | + run: | |
| 186 | + set -e |
| 187 | + echo "Building Section 08: Selenium 4.0 Features" |
| 188 | + find 08-selenium-40-features -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 189 | + echo "Building $(dirname $pom)" |
| 190 | + mvn clean compile -B -f "$pom" || { |
| 191 | + echo "Failed to compile $pom" |
| 192 | + exit 1 |
| 193 | + } |
| 194 | + done |
| 195 | + echo "Section 08 completed successfully" |
| 196 | +
|
| 197 | + build-09-testng: |
| 198 | + name: "Section 09: TestNG" |
| 199 | + runs-on: ubuntu-latest |
| 200 | + |
| 201 | + steps: |
| 202 | + - uses: actions/checkout@v5 |
| 203 | + |
| 204 | + - name: Set up JDK 25 |
| 205 | + uses: actions/setup-java@v5 |
| 206 | + with: |
| 207 | + java-version: '25' |
| 208 | + distribution: 'temurin' |
| 209 | + cache: 'maven' |
| 210 | + |
| 211 | + - name: Build all projects in section |
| 212 | + run: | |
| 213 | + set -e |
| 214 | + echo "Building Section 09: TestNG" |
| 215 | + find 09-testng -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 216 | + echo "Building $(dirname $pom)" |
| 217 | + mvn clean compile -B -f "$pom" || { |
| 218 | + echo "Failed to compile $pom" |
| 219 | + exit 1 |
| 220 | + } |
| 221 | + done |
| 222 | + echo "Section 09 completed successfully" |
| 223 | +
|
| 224 | + build-10-automation-framework: |
| 225 | + name: "Section 10: Automation Framework - Basic" |
| 226 | + runs-on: ubuntu-latest |
| 227 | + |
| 228 | + steps: |
| 229 | + - uses: actions/checkout@v5 |
| 230 | + |
| 231 | + - name: Set up JDK 25 |
| 232 | + uses: actions/setup-java@v5 |
| 233 | + with: |
| 234 | + java-version: '25' |
| 235 | + distribution: 'temurin' |
| 236 | + cache: 'maven' |
| 237 | + |
| 238 | + - name: Build all projects in section |
| 239 | + run: | |
| 240 | + set -e |
| 241 | + echo "Building Section 10: Automation Framework - Basic" |
| 242 | + find 10-automation-framework-basic -name pom.xml -not -path "*/target/*" | sort | while read pom; do |
| 243 | + echo "Building $(dirname $pom)" |
| 244 | + mvn clean compile -B -f "$pom" || { |
| 245 | + echo "Failed to compile $pom" |
| 246 | + exit 1 |
| 247 | + } |
| 248 | + done |
| 249 | + echo "Section 10 completed successfully" |
0 commit comments