Repository navigation
feat: normalize dictionaries #12
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: CI Pipeline | |
| on: [pull_request] | |
| jobs: | |
| install-and-cache: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| id: npm-cache | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install dependencies | |
| if: steps.npm-cache.outputs.cache-hit != 'true' | |
| run: npm ci | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: install-and-cache | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| - name: Restore cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - name: Run tests | |
| run: npm run test:coverage | |
| - name: Create Coverage Badges | |
| uses: jaywcjlove/coverage-badges-cli@main | |
| with: | |
| style: flat | |
| scale: "1.4" | |
| source: coverage/coverage-summary.json | |
| output: coverage/badge.svg | |
| jsonPath: total.statements.pct | |
| - name: Deploy badge to gh-pages branch | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./coverage | |
| publish_branch: gh-pages | |
| keep_files: false | |
| code-quality: | |
| runs-on: ubuntu-latest | |
| needs: install-and-cache | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| - name: Restore cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - name: Run lint and prettier | |
| run: | | |
| npm run lint | |
| npm run prettier:check | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [test, code-quality] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" | |
| - name: Restore cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| - name: Build project | |
| run: npm run build |