forked from baron/baron-sso
CI 실행 경로와 Playwright 서버 명령 정리
This commit is contained in:
@@ -655,8 +655,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Playwright version
|
- name: Get Playwright version
|
||||||
id: playwright-version
|
id: playwright-version
|
||||||
|
working-directory: devfront
|
||||||
run: |
|
run: |
|
||||||
cd devfront
|
|
||||||
echo "version=$(pnpm list -C ../common @playwright/test --depth 0 | grep @playwright/test | awk -F@ '{print $NF}' | head -n 1)" >> "$GITHUB_OUTPUT"
|
echo "version=$(pnpm list -C ../common @playwright/test --depth 0 | grep @playwright/test | awk -F@ '{print $NF}' | head -n 1)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Cache Playwright Browsers
|
- name: Cache Playwright Browsers
|
||||||
@@ -669,14 +669,12 @@ jobs:
|
|||||||
${{ runner.os }}-playwright-
|
${{ runner.os }}-playwright-
|
||||||
|
|
||||||
- name: Install devfront dependencies
|
- name: Install devfront dependencies
|
||||||
|
working-directory: devfront
|
||||||
run: |
|
run: |
|
||||||
mkdir -p reports
|
mkdir -p ../reports
|
||||||
set +e
|
set +e
|
||||||
cd devfront
|
|
||||||
npm install -g pnpm
|
|
||||||
pnpm install -C ../common --no-frozen-lockfile 2>&1 | tee ../reports/devfront-install.log
|
pnpm install -C ../common --no-frozen-lockfile 2>&1 | tee ../reports/devfront-install.log
|
||||||
install_exit_code=${PIPESTATUS[0]}
|
install_exit_code=${PIPESTATUS[0]}
|
||||||
cd ..
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$install_exit_code" -ne 0 ]; then
|
if [ "$install_exit_code" -ne 0 ]; then
|
||||||
@@ -689,23 +687,22 @@ jobs:
|
|||||||
echo "- Exit Code: \`$install_exit_code\`"
|
echo "- Exit Code: \`$install_exit_code\`"
|
||||||
echo
|
echo
|
||||||
echo "## Command"
|
echo "## Command"
|
||||||
echo "\`cd devfront && npm ci\`"
|
echo "\`cd devfront && pnpm install -C ../common --no-frozen-lockfile\`"
|
||||||
echo
|
echo
|
||||||
echo "## Install Log Tail (last 200 lines)"
|
echo "## Install Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
tail -n 200 reports/devfront-install.log
|
tail -n 200 ../reports/devfront-install.log
|
||||||
echo '```'
|
echo '```'
|
||||||
} > reports/devfront-test-failure-report.md
|
} > ../reports/devfront-test-failure-report.md
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Provision browsers for devfront tests
|
- name: Provision browsers for devfront tests
|
||||||
|
working-directory: devfront
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
cd devfront
|
|
||||||
pnpm exec playwright install --with-deps 2>&1 | tee ../reports/devfront-provision.log
|
pnpm exec playwright install --with-deps 2>&1 | tee ../reports/devfront-provision.log
|
||||||
provision_exit_code=${PIPESTATUS[0]}
|
provision_exit_code=${PIPESTATUS[0]}
|
||||||
cd ..
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$provision_exit_code" -ne 0 ]; then
|
if [ "$provision_exit_code" -ne 0 ]; then
|
||||||
@@ -722,22 +719,21 @@ jobs:
|
|||||||
echo
|
echo
|
||||||
echo "## Provision Log Tail (last 200 lines)"
|
echo "## Provision Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
tail -n 200 reports/devfront-provision.log
|
tail -n 200 ../reports/devfront-provision.log
|
||||||
echo '```'
|
echo '```'
|
||||||
} > reports/devfront-test-failure-report.md
|
} > ../reports/devfront-test-failure-report.md
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Run devfront tests
|
- name: Run devfront tests
|
||||||
|
working-directory: devfront
|
||||||
env:
|
env:
|
||||||
PLAYWRIGHT_WORKERS: 2
|
PLAYWRIGHT_WORKERS: 2
|
||||||
run: |
|
run: |
|
||||||
mkdir -p reports
|
mkdir -p ../reports
|
||||||
set +e
|
set +e
|
||||||
cd devfront
|
pnpm test 2>&1 | tee ../reports/devfront-test.log
|
||||||
pnpm run test 2>&1 | tee ../reports/devfront-test.log
|
|
||||||
test_exit_code=${PIPESTATUS[0]}
|
test_exit_code=${PIPESTATUS[0]}
|
||||||
cd ..
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$test_exit_code" -ne 0 ]; then
|
if [ "$test_exit_code" -ne 0 ]; then
|
||||||
@@ -750,15 +746,15 @@ jobs:
|
|||||||
echo
|
echo
|
||||||
echo "## Commands"
|
echo "## Commands"
|
||||||
echo "1. \`cd devfront\`"
|
echo "1. \`cd devfront\`"
|
||||||
echo "2. \`npm ci\`"
|
echo "2. \`pnpm install -C ../common --no-frozen-lockfile\`"
|
||||||
echo "3. \`pnpm exec playwright install --with-deps\`"
|
echo "3. \`pnpm exec playwright install --with-deps\`"
|
||||||
echo "4. \`pnpm run test\`"
|
echo "4. \`pnpm test\`"
|
||||||
echo
|
echo
|
||||||
echo "## Log Tail (last 200 lines)"
|
echo "## Log Tail (last 200 lines)"
|
||||||
echo '```text'
|
echo '```text'
|
||||||
tail -n 200 reports/devfront-test.log
|
tail -n 200 ../reports/devfront-test.log
|
||||||
echo '```'
|
echo '```'
|
||||||
} > reports/devfront-test-failure-report.md
|
} > ../reports/devfront-test-failure-report.md
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit "$test_exit_code"
|
exit "$test_exit_code"
|
||||||
|
|||||||
Reference in New Issue
Block a user