Update tomcat.yml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TomcatExp | |
on: [push] | |
jobs: | |
tomcat-shutdown: | |
runs-on: windows-2019 | |
steps: | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Download Apache Tomcat 9.0.90 | |
run: | | |
curl -o tomcat.zip https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.93/bin/apache-tomcat-9.0.93.zip | |
Expand-Archive -Path tomcat.zip -DestinationPath tomcat | |
- name: Check current directory | |
run: | | |
echo "Current Directory:" | |
pwd | |
echo "Directory Contents:" | |
dir | |
- name: Start Tomcat | |
run: | | |
tomcat\apache-tomcat-9.0.90\bin\startup.bat | |
shell: cmd | |
- name: Wait for 10 seconds | |
run: timeout 10 | |
- name: Shut down Tomcat and measure shutdown time | |
run: | | |
$start = Get-Date | |
./tomcat/bin/shutdown.bat | |
$end = Get-Date | |
$duration = $end - $start | |
Write-Host "Tomcat shutdown duration: $duration" | |
shell: pwsh | |
- name: Cleanup | |
run: Remove-Item -Recurse -Force tomcat |