devDeps(deps-dev): bump vite from 6.0.6 to 6.0.7 (#19) #45
This file contains 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: PR Build Check | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
- name: Use Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0 | |
with: | |
node-version: "20.11.1" | |
cache: "npm" | |
- name: Debug files | |
run: | | |
echo "Current directory structure:" | |
tree src/ | |
echo "Content of logger.ts:" | |
cat src/lib/logger.ts | |
echo "Content of popup.ts:" | |
cat src/popup/popup.ts | |
- name: Verify imports | |
run: | | |
if [ ! -f "src/lib/logger.ts" ]; then | |
echo "Error: logger.ts not found" | |
exit 1 | |
fi | |
- name: Clean install | |
run: | | |
rm -rf node_modules | |
rm -f package-lock.json | |
npm install | |
- name: Install platform specific dependencies | |
run: | | |
npm install @rollup/rollup-linux-x64-gnu | |
- name: Build project | |
run: npm run build | |
- name: Show build artifacts | |
if: failure() | |
run: | | |
ls -la dist/ | |
cat dist/popup.js || true | |
- name: Check manifest version | |
run: | | |
VERSION=$(node -p "require('./manifest.json').version") | |
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
echo "Manifest version is valid: $VERSION" | |
else | |
echo "Invalid manifest version: $VERSION" | |
exit 1 | |
fi | |
- name: Validate manifest permissions | |
run: | | |
PERMISSIONS=$(node -p "JSON.stringify(require('./manifest.json').permissions)") | |
EXPECTED_PERMISSIONS='["activeTab","scripting","downloads"]' | |
if [ "$PERMISSIONS" = "$EXPECTED_PERMISSIONS" ]; then | |
echo "Manifest permissions are valid" | |
else | |
echo "Unexpected manifest permissions: $PERMISSIONS" | |
exit 1 | |
fi | |
- name: Check Vite config | |
run: | | |
if grep -q "svelte({" vite.config.ts && grep -q "build: {" vite.config.ts; then | |
echo "Vite config seems to be properly set up" | |
else | |
echo "Vite config might be missing important configurations" | |
exit 1 | |
fi |