Skip to content

Commit

Permalink
tomcat.yml - experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
s50600822 authored Sep 5, 2024
1 parent 9cb944a commit fe6ae4d
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/tomcat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: TomcatExp

on: [push]

jobs:
tomcat-shutdown:
runs-on: windows-2019

steps:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'

- 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
tar -xf tomcat.zip
mv apache-tomcat-9.0.90 tomcat
- name: Start Tomcat
run: |
./tomcat/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

0 comments on commit fe6ae4d

Please sign in to comment.