forked from trent_larson/crowd-funder-for-time-pwa
refactor: complete migration from GitHub to Gitea
- Remove all GitHub-specific workflows and configurations - Update .dockerignore to exclude .github directory - Clean up GitHub Actions workflows and branch protection rules - Complete transition to Gitea Actions and Husky hooks
This commit is contained in:
@@ -140,7 +140,7 @@ docker-compose*
|
|||||||
.dockerignore
|
.dockerignore
|
||||||
|
|
||||||
# CI/CD files
|
# CI/CD files
|
||||||
.github
|
|
||||||
.gitlab-ci.yml
|
.gitlab-ci.yml
|
||||||
.travis.yml
|
.travis.yml
|
||||||
.circleci
|
.circleci
|
||||||
|
|||||||
142
.github/workflows/asset-validation.yml
vendored
142
.github/workflows/asset-validation.yml
vendored
@@ -1,142 +0,0 @@
|
|||||||
name: Asset Validation & CI Safeguards
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'resources/**'
|
|
||||||
- 'config/assets/**'
|
|
||||||
- 'capacitor-assets.config.json'
|
|
||||||
- 'capacitor.config.ts'
|
|
||||||
- 'capacitor.config.json'
|
|
||||||
push:
|
|
||||||
branches: [main, develop]
|
|
||||||
paths:
|
|
||||||
- 'resources/**'
|
|
||||||
- 'config/assets/**'
|
|
||||||
- 'capacitor-assets.config.json'
|
|
||||||
- 'capacitor.config.ts'
|
|
||||||
- 'capacitor.config.json'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
asset-validation:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Validate asset configuration
|
|
||||||
run: npm run assets:validate
|
|
||||||
|
|
||||||
- name: Check for committed platform assets (Android)
|
|
||||||
run: |
|
|
||||||
if git ls-files -z android/app/src/main/res | grep -E '(AppIcon.*\.png|Splash.*\.png|mipmap-.*/ic_launcher.*\.png)' > /dev/null; then
|
|
||||||
echo "❌ Android platform assets found in VCS - these should be generated at build-time"
|
|
||||||
git ls-files -z android/app/src/main/res | grep -E '(AppIcon.*\.png|Splash.*\.png|mipmap-.*/ic_launcher.*\.png)'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "✅ No Android platform assets committed"
|
|
||||||
|
|
||||||
- name: Check for committed platform assets (iOS)
|
|
||||||
run: |
|
|
||||||
if git ls-files -z ios/App/App/Assets.xcassets | grep -E '(AppIcon.*\.png|Splash.*\.png)' > /dev/null; then
|
|
||||||
echo "❌ iOS platform assets found in VCS - these should be generated at build-time"
|
|
||||||
git ls-files -z ios/App/App/Assets.xcassets | grep -E '(AppIcon.*\.png|Splash.*\.png)'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "✅ No iOS platform assets committed"
|
|
||||||
|
|
||||||
- name: Test asset generation
|
|
||||||
run: |
|
|
||||||
echo "🧪 Testing asset generation workflow..."
|
|
||||||
npm run build:capacitor
|
|
||||||
npx cap sync
|
|
||||||
npx capacitor-assets generate --dry-run || npx capacitor-assets generate
|
|
||||||
echo "✅ Asset generation test completed"
|
|
||||||
|
|
||||||
- name: Verify clean tree after build
|
|
||||||
run: |
|
|
||||||
if [ -n "$(git status --porcelain)" ]; then
|
|
||||||
echo "❌ Dirty tree after build - asset configs were modified"
|
|
||||||
git status
|
|
||||||
git diff
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "✅ Build completed with clean tree"
|
|
||||||
|
|
||||||
schema-validation:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Validate schema compliance
|
|
||||||
run: |
|
|
||||||
echo "🔍 Validating schema compliance..."
|
|
||||||
node -e "
|
|
||||||
const fs = require('fs');
|
|
||||||
const config = JSON.parse(fs.readFileSync('capacitor-assets.config.json', 'utf8'));
|
|
||||||
const schema = JSON.parse(fs.readFileSync('config/assets/schema.json', 'utf8'));
|
|
||||||
|
|
||||||
// Basic schema validation
|
|
||||||
if (!config.icon || !config.splash) {
|
|
||||||
throw new Error('Missing required sections: icon and splash');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!config.icon.source || !config.splash.source) {
|
|
||||||
throw new Error('Missing required source fields');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!/^resources\/.*\.(png|svg)$/.test(config.icon.source)) {
|
|
||||||
throw new Error('Icon source must be in resources/ directory');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!/^resources\/.*\.(png|svg)$/.test(config.splash.source)) {
|
|
||||||
throw new Error('Splash source must be in resources/ directory');
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('✅ Schema validation passed');
|
|
||||||
"
|
|
||||||
|
|
||||||
- name: Check source file existence
|
|
||||||
run: |
|
|
||||||
echo "📁 Checking source file existence..."
|
|
||||||
node -e "
|
|
||||||
const fs = require('fs');
|
|
||||||
const config = JSON.parse(fs.readFileSync('capacitor-assets.config.json', 'utf8'));
|
|
||||||
|
|
||||||
const requiredFiles = [
|
|
||||||
config.icon.source,
|
|
||||||
config.splash.source
|
|
||||||
];
|
|
||||||
|
|
||||||
if (config.splash.darkSource) {
|
|
||||||
requiredFiles.push(config.splash.darkSource);
|
|
||||||
}
|
|
||||||
|
|
||||||
const missingFiles = requiredFiles.filter(file => !fs.existsSync(file));
|
|
||||||
|
|
||||||
if (missingFiles.length > 0) {
|
|
||||||
console.error('❌ Missing source files:', missingFiles);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('✅ All source files exist');
|
|
||||||
"
|
|
||||||
27
.github/workflows/playwright.yml
vendored
27
.github/workflows/playwright.yml
vendored
@@ -1,27 +0,0 @@
|
|||||||
name: Playwright Tests
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main, master ]
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
timeout-minutes: 60
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: lts/*
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
- name: Install Playwright Browsers
|
|
||||||
run: npx playwright install --with-deps
|
|
||||||
- name: Run Playwright tests
|
|
||||||
run: npx playwright test
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: playwright-report
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 30
|
|
||||||
Reference in New Issue
Block a user