ci: Change upstream repo and disable OpenGL builds #2
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 Scripts | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "scripts/**" | |
| - ".github/workflows/test.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "scripts/**" | |
| - ".github/workflows/test.yml" | |
| workflow_dispatch: | |
| jobs: | |
| test-scripts: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Make scripts executable | |
| run: chmod +x scripts/*.sh | |
| - name: Run release preparation tests | |
| run: ./scripts/test-prepare-release.sh | |
| - name: Test script directly (no artifacts - should fail) | |
| run: | | |
| echo "Testing script behavior with no artifacts..." | |
| if ./scripts/prepare-release.sh; then | |
| echo "❌ FAIL: Script should have failed with no artifacts" | |
| exit 1 | |
| else | |
| echo "✅ Script correctly failed when no artifacts present" | |
| fi | |
| - name: Test script with mock artifacts | |
| run: | | |
| echo "Testing script with mock artifacts..." | |
| # Create mock artifacts | |
| mkdir -p artifacts/cli-release | |
| mkdir -p artifacts/editor-dx11-release | |
| echo "mock cli executable" > artifacts/cli-release/cli.exe | |
| echo "mock dx11 executable" > artifacts/editor-dx11-release/zed.exe | |
| # Run the script | |
| ./scripts/prepare-release.sh | |
| if [ ! -f "release/zed.zip" ]; then | |
| echo "❌ FAIL: Missing zed.zip" | |
| exit 1 | |
| fi | |
| if [ ! -f "release/sha256sums.txt" ]; then | |
| echo "❌ FAIL: Missing sha256sums.txt" | |
| exit 1 | |
| fi | |
| # Verify checksums | |
| cd release | |
| if ! sha256sum -c sha256sums.txt; then | |
| echo "❌ FAIL: Checksum verification failed" | |
| exit 1 | |
| fi | |
| echo "✅ All release files created and verified successfully" | |
| - name: Display test results | |
| if: always() | |
| run: | | |
| echo "" | |
| echo "🧪 Test Summary:" | |
| echo "- Script test suite: Completed" | |
| echo "- No artifacts test: Completed" | |
| echo "- Mock artifacts test: Completed" | |
| echo "" | |
| echo "✅ All script tests passed!" |