feat: implement comprehensive GitHub workflow and project management … #1
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linting | |
| run: npm run lint || echo "Linting not configured yet" | |
| - name: Run tests | |
| run: npm test | |
| - name: Build project | |
| run: npm run build | |
| - name: Test CLI functionality | |
| run: | | |
| npm run link:global | |
| peezy --version | |
| peezy --help | |
| build-and-test-templates: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build CLI | |
| run: npm run build | |
| - name: Link CLI globally | |
| run: npm run link:global | |
| - name: Test React + Vite template | |
| run: | | |
| mkdir -p test-outputs/react-vite | |
| cd test-outputs/react-vite | |
| echo -e "react\nvite\njavascript\nno\nno" | peezy create test-react-app | |
| cd test-react-app | |
| npm install | |
| npm run build | |
| - name: Test Vue + Vite template | |
| run: | | |
| mkdir -p test-outputs/vue-vite | |
| cd test-outputs/vue-vite | |
| echo -e "vue\nvite\njavascript\nno\nno" | peezy create test-vue-app | |
| cd test-vue-app | |
| npm install | |
| npm run build | |
| - name: Test Flask template | |
| run: | | |
| mkdir -p test-outputs/flask | |
| cd test-outputs/flask | |
| echo -e "flask\nno\nno" | peezy create test-flask-app | |
| cd test-flask-app | |
| python -m venv venv | |
| source venv/bin/activate | |
| pip install -r requirements.txt | |
| python -c "from app import app; print('Flask app imports successfully')" | |
| security: | |
| 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.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run security audit | |
| run: npm audit --audit-level moderate | |
| - name: Check for vulnerabilities | |
| run: npm audit --audit-level high --production |