Skip to content

Update tomcat.yml

Update tomcat.yml #3

Workflow file for this run

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.90/bin/apache-tomcat-9.0.90-windows-x64.zip
Expand-Archive -Path tomcat.zip -DestinationPath tomcat
- 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