Skip to content

Commit

Permalink
ci: adds docker test check suite workflow (garris#1533)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrebb committed Jan 15, 2024
1 parent 83dfe38 commit d08668b
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-sanity-test-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ jobs:
<(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end) | del(.tests[].pair.diff)' test/configs/backstop_data/bitmaps_test/**/report.json))
echo "PUPPETEER_TEST_RESULT=$PUPPETEER_TEST_RESULT" >> $GITHUB_ENV
if [[ "$PUPPETEER_TEST_RESULT" != "" ]]; then
echo "# ❎ Puppeteer Smoke Different" >> $GITHUB_STEP_SUMMARY
echo "# ❎ Docker Puppeteer Smoke Different" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "${PUPPETEER_TEST_RESULT}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "# ✅ Puppeteer Smoke Report Valid" >> $GITHUB_STEP_SUMMARY
echo "# ✅ Docker Puppeteer Smoke Report Validated" >> $GITHUB_STEP_SUMMARY
fi
- name: "Full Smoke Report Diff"
Expand Down Expand Up @@ -166,12 +166,12 @@ jobs:
<(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end) | del(.tests[].pair.diff)' test/configs/backstop_data/bitmaps_test/**/report.json)
echo "PLAYWRIGHT_TEST_RESULT=$PLAYWRIGHT_TEST_RESULT" >> $GITHUB_ENV
if [[ "$PLAYWRIGHT_TEST_RESULT" != "" ]]; then
echo "# ❎ Playwright Sanity Report Different" >> $GITHUB_STEP_SUMMARY
echo "# ❎ Docker Playwright Sanity Report Different" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "${PLAYWRIGHT_TEST_RESULT}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "# ✅ Playwright Sanity Report Valid" >> $GITHUB_STEP_SUMMARY
echo "# ✅ Docker Playwright Sanity Report Validated" >> $GITHUB_STEP_SUMMARY
fi
- name: "Full Sanity Report Diff"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker-smoke-test-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ jobs:
<(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end)' test/configs/backstop_data/bitmaps_test/**/report.json))
echo "PUPPETEER_TEST_RESULT=$PUPPETEER_TEST_RESULT" >> $GITHUB_ENV
if [[ "$PUPPETEER_TEST_RESULT" != "" ]]; then
echo "# ❎ Puppeteer Smoke Different" >> $GITHUB_STEP_SUMMARY
echo "# ❎ Docker Puppeteer Smoke Different" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "${PUPPETEER_TEST_RESULT}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "# ✅ Puppeteer Smoke Report Valid" >> $GITHUB_STEP_SUMMARY
echo "# ✅ Docker Puppeteer Smoke Report Validated" >> $GITHUB_STEP_SUMMARY
fi
- name: "Full Smoke Report Diff"
Expand Down Expand Up @@ -164,12 +164,12 @@ jobs:
<(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end)' test/configs/backstop_data/bitmaps_test/**/report.json))
echo "PLAYWRIGHT_TEST_RESULT=$PLAYWRIGHT_TEST_RESULT" >> $GITHUB_ENV
if [[ "$PLAYWRIGHT_TEST_RESULT" != "" ]]; then
echo "# ❎ Playwright Sanity Report Different" >> $GITHUB_STEP_SUMMARY
echo "# ❎ Docker Playwright Sanity Report Different" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "${PLAYWRIGHT_TEST_RESULT}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "# ✅ Playwright Sanity Report Valid" >> $GITHUB_STEP_SUMMARY
echo "# ✅ Docker Playwright Sanity Report Validated" >> $GITHUB_STEP_SUMMARY
fi
- name: "Full Sanity Report Diff"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-test-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
TEST_RESULT=$(diff <(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end)' test/__fixtures__/integration-test.json) <(jq 'walk(if type == "object" then with_entries(.value |= if type == "object" or type == "array" then . else "" end) else . end)' ${TEST_REPORT_DIR}report.json))
echo "TEST_RESULT=$TEST_RESULT" >> $GITHUB_ENV
if [[ "$TEST_RESULT" != "" ]]; then
echo "# ❎ Integration Test Report Shapes Differ:" >> $GITHUB_STEP_SUMMARY
echo "# ❎ Integration Report Differerent" >> $GITHUB_STEP_SUMMARY
echo "## Failing Diff" >> $GITHUB_STEP_SUMMARY
echo '```diff' >> $GITHUB_STEP_SUMMARY
echo "${TEST_RESULT}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "# ✅ Integration Test Report Shapes Match" >> $GITHUB_STEP_SUMMARY
echo "# ✅ Integration Report Validated" >> $GITHUB_STEP_SUMMARY
fi
- name: "Full Integration Test Diff"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sanity-test-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
echo "${PUPPETEER_TEST_RESULT}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "# ✅ Puppeteer Sanity Report Valid" >> $GITHUB_STEP_SUMMARY
echo "# ✅ Puppeteer Sanity Report Validated" >> $GITHUB_STEP_SUMMARY
fi
- name: "Full Sanity Report Diff"
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
echo "${PLAYWRIGHT_TEST_RESULT}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "# ✅ Playwright Sanity Report Valid" >> $GITHUB_STEP_SUMMARY
echo "# ✅ Playwright Sanity Report Validated" >> $GITHUB_STEP_SUMMARY
fi
- name: "Full Sanity Report Diff"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-check-backstop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Backstop Test Checks
name: Test Checks

on:
workflow_dispatch:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/test-check-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Docker Test Checks

on:
workflow_dispatch:
workflow_call:

permissions:
actions: write
checks: write
contents: write
pull-requests: write
packages: write

jobs:
sanity-test:
name: 💨 Docker Smoke Test
uses: ./.github/workflows/docker-smoke-test-checks.yml

smoke-test:
name: 🤪 Docker Sanity Test
uses: ./.github/workflows/docker-sanity-test-checks.yml

0 comments on commit d08668b

Please sign in to comment.