Extract CollectionHelperMethods #69
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 | |
on: | |
pull_request: | |
branches: | |
- main | |
- init-migrate-to-ts | |
# run only if there is ts files in the PR | |
paths: | |
- 'src/**/*.ts' | |
jobs: | |
diff: | |
name: 'Output diff' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: 'pr' | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.base.sha }} | |
path: 'main' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.OS }}-node- | |
- name: 'Install PR branch dependencies' | |
run: npm ci | |
working-directory: pr | |
- name: 'Install main branch dependencies' | |
run: npm ci | |
working-directory: main | |
- name: 'Build PR branch' | |
run: npm run build | |
working-directory: pr | |
- name: 'Build main branch' | |
run: npm run build | |
working-directory: main | |
- name: 'Execute prettier and remove ts-expect-error on PR dist' | |
run: npx terser dist/immutable.es.js --comments false | npx prettier --parser=babel > dist/immutable.es.prettier.js | |
working-directory: pr | |
- name: 'Execute prettier main dist' | |
run: npx terser dist/immutable.es.js --comments false | npx prettier --parser=babel > dist/immutable.es.prettier.js | |
working-directory: main | |
- name: 'Output diff' | |
run: diff --unified --ignore-blank-lines --ignore-all-space main/dist/immutable.es.prettier.js pr/dist/immutable.es.prettier.js |