feat: implement generator module #24
Workflow file for this run
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: Build and Test | |
| on: | |
| pull_request: | |
| types: | |
| - labeled | |
| - unlabeled | |
| - synchronize | |
| branches: | |
| - development | |
| jobs: | |
| labels-workflow: | |
| name: Labels Workflow | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Validate Required Labels | |
| uses: actions/github-script@v7 | |
| id: labels | |
| with: | |
| script: | | |
| const labelsSet = ['minor', 'patch', 'major']; | |
| const labels = context.payload.pull_request.labels.map((label) => label.name); | |
| if (!labelsSet.some(label => labels.includes(label))) { | |
| core.setFailed(`❌ Please add one of the following labels to proceed: "major", "minor", "patch".`); | |
| return; | |
| } | |
| api-workflow: | |
| name: API Workflow | |
| needs: labels-workflow | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set Up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24.7.0" | |
| - name: Install Dependencies | |
| working-directory: ./api | |
| run: npm install | |
| - name: Lint | |
| working-directory: ./api | |
| run: npm run lint | |
| - name: Unit Tests | |
| working-directory: ./api | |
| run: npm run test:coverage | |
| - name: E2E Tests | |
| working-directory: ./api | |
| run: npm run test:e2e | |
| - name: Build | |
| working-directory: ./api | |
| run: npm run build |