Lock file maintenance (npm) #177
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: | |
| pull_request: | |
| jobs: | |
| lint-build-check-test-and-use: | |
| name: Lint, Build, Check, Test and Use | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| node-version-file: '.node-version' | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: | | |
| pnpm run lint | |
| - name: Build | |
| run: | | |
| pnpm run build | |
| - name: Check repo status | |
| run: | | |
| repo_status=$(git status --porcelain) | |
| if [[ ! -z "${repo_status}" ]]; then | |
| echo "::error::Uncommitted changes detected" | |
| echo "${repo_status}" | |
| git status -vv | |
| exit 1 | |
| fi | |
| - name: Test | |
| run: | | |
| pnpm run test |