From 21dddb87bca04f7a1eb01ac7a9fdf984a8a15385 Mon Sep 17 00:00:00 2001 From: Stefano Lombardo Date: Wed, 22 May 2024 19:42:59 +0200 Subject: [PATCH] tests(parallel CGI) add test in the yml file --- .github/workflows/webserv.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/webserv.yml b/.github/workflows/webserv.yml index 0a2a253..e7a0bac 100644 --- a/.github/workflows/webserv.yml +++ b/.github/workflows/webserv.yml @@ -42,8 +42,8 @@ jobs: python3 -m pip install aiohttp asyncio aiofiles - name: Start webserv in background run: ./webserv & - - name: Install lsof - run: sudo apt-get update && sudo apt-get install -y lsof + - name: Install needed dependencies + run: sudo apt-get update && sudo apt-get install -y lsof curl - name: Run Config file tests if: always() working-directory: tests/config @@ -104,6 +104,17 @@ jobs: echo "❌ Tests failed. Exiting with status code $exit_code." exit $exit_code fi + - name: Make parallel_cgi/durations_ts.sh executable + run: chmod +x test/parallel_cgi/durations_ts.sh + - name: Run parallel CGIs Test + run: ./tests/parallel_cgi/durations_ts.sh + exit_code=$? + if [ $exit_code -ne 0 ]; then + echo "❌ Parallel CGI tests failed. Exiting with status code $exit_code." + exit $exit_code + else + echo "✅ Parallel CGI tests passed." + fi - name: Check for Zombie Processes run: | zombies=$(ps aux | grep 'Z' | grep -v grep)