Migrate yarn to npm #1025
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: formatting-check | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| jobs: | |
| check_formatting: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-versions: [20.x] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Node cache | |
| id: npm-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: "**/node_modules" | |
| key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }} | |
| - name: Install dependencies | |
| if: steps.npm-cache.outputs.cache-hit != 'true' | |
| run: npm i | |
| - id: files | |
| uses: jitterbit/get-changed-files@v1 | |
| with: | |
| format: csv | |
| - name: Run scoped actions | |
| uses: DukeManh/scoped-actions@v1 | |
| with: | |
| files: ${{ steps.files.outputs.added_modified}} | |
| eslintTarget: "src/**/*.{jsx,tsx,ts,js}" | |
| s0: "npm run eslint" | |
| s1: "npm run prettier --check" |