Add Google Search Console verification file #40
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run style linting | |
| run: npm run lint-check | |
| - name: Validate extension manifest | |
| run: | | |
| # Basic JSON validation | |
| node -e "JSON.parse(require('fs').readFileSync('src/manifest.json', 'utf8'))" | |
| echo "✓ manifest.json is valid JSON" | |
| # Check required fields | |
| node -e " | |
| const manifest = JSON.parse(require('fs').readFileSync('src/manifest.json', 'utf8')); | |
| const required = ['manifest_version', 'name', 'version', 'permissions']; | |
| required.forEach(field => { | |
| if (!manifest[field]) throw new Error(\`Missing required field: \${field}\`); | |
| }); | |
| console.log('✓ manifest.json has all required fields'); | |
| " | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Test build process | |
| run: npm run build-simple | |
| - name: Verify build output | |
| run: | | |
| if [ ! -f "dist/chromium-mask.zip" ]; then | |
| echo "❌ Build failed - no ZIP file created" | |
| exit 1 | |
| fi | |
| # Check if ZIP contains expected files | |
| if ! unzip -l dist/chromium-mask.zip | grep -q "manifest.json"; then | |
| echo "❌ Build failed - no manifest.json in ZIP" | |
| exit 1 | |
| fi | |
| echo "✓ Build successful" | |
| unzip -l dist/chromium-mask.zip |