Add PostgreSQL test workflow with 4 tests and pg_isready health check #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test All Packages on Arm64 | |
| on: | |
| schedule: | |
| # Run daily at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: # Allow manual triggering | |
| push: | |
| branches: | |
| - main | |
| - smoke_tests | |
| paths: | |
| - 'content/opensource_packages/*.md' | |
| - 'content/commercial_packages/*.md' | |
| - '.github/workflows/test-all-packages.yml' | |
| - '.github/workflows/test-*.yml' | |
| jobs: | |
| # Test nginx | |
| test-nginx: | |
| uses: ./.github/workflows/test-nginx.yml | |
| # Test envoy | |
| test-envoy: | |
| uses: ./.github/workflows/test-envoy.yml | |
| # Test kafka | |
| test-kafka: | |
| uses: ./.github/workflows/test-kafka.yml | |
| # Test memcached | |
| test-memcached: | |
| uses: ./.github/workflows/test-memcached.yml | |
| # Test mongodb | |
| test-mongodb: | |
| uses: ./.github/workflows/test-mongodb.yml | |
| # Test mysql | |
| test-mysql: | |
| uses: ./.github/workflows/test-mysql.yml | |
| # Test spark | |
| test-spark: | |
| uses: ./.github/workflows/test-spark.yml | |
| # Test postgres | |
| test-postgres: | |
| uses: ./.github/workflows/test-postgres.yml | |
| # Add more packages here: | |
| # test-redis: | |
| # uses: ./.github/workflows/test-redis.yml | |
| # Summary job that runs after all tests | |
| summary: | |
| needs: [test-nginx, test-envoy, test-kafka, test-memcached, test-mongodb, test-mysql, test-spark, test-postgres] | |
| runs-on: ubuntu-24.04-arm | |
| if: always() | |
| steps: | |
| - name: Download all test results | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: test-results | |
| - name: Create summary | |
| run: | | |
| echo "# 📊 Package Test Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "## Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| TOTAL_PACKAGES=0 | |
| PASSED_PACKAGES=0 | |
| FAILED_PACKAGES=0 | |
| for result_dir in test-results/*/; do | |
| if [ -d "$result_dir" ]; then | |
| TOTAL_PACKAGES=$((TOTAL_PACKAGES + 1)) | |
| for json_file in "$result_dir"*.json; do | |
| if [ -f "$json_file" ]; then | |
| PKG_NAME=$(jq -r '.package.name' "$json_file") | |
| STATUS=$(jq -r '.run.status' "$json_file") | |
| TESTS_PASSED=$(jq -r '.tests.passed' "$json_file") | |
| TESTS_FAILED=$(jq -r '.tests.failed' "$json_file") | |
| VERSION=$(jq -r '.package.version' "$json_file") | |
| if [ "$STATUS" = "success" ]; then | |
| PASSED_PACKAGES=$((PASSED_PACKAGES + 1)) | |
| echo "✅ **$PKG_NAME** (v$VERSION): $TESTS_PASSED tests passed" >> $GITHUB_STEP_SUMMARY | |
| else | |
| FAILED_PACKAGES=$((FAILED_PACKAGES + 1)) | |
| echo "❌ **$PKG_NAME** (v$VERSION): $TESTS_FAILED tests failed" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| fi | |
| done | |
| fi | |
| done | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "## Overall Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Total Packages Tested:** $TOTAL_PACKAGES" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Passed:** $PASSED_PACKAGES ✅" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Failed:** $FAILED_PACKAGES ❌" >> $GITHUB_STEP_SUMMARY |