Skip to content

Update tomcat.yml

Update tomcat.yml #7

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.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
echo "Tomcat Directory Content:"
dir -Recurse -Path tomcat
- name: Start Tomcat
run: |
tomcat\apache-tomcat-9.0.93\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