Skip to content

Commit

Permalink
feat: byebye yarn, welcome pnpm
Browse files Browse the repository at this point in the history
Signed-off-by: drptbl <jakub.mucha@icloud.com>
  • Loading branch information
drptbl committed Apr 20, 2024
1 parent c8047d3 commit 7841e91
Show file tree
Hide file tree
Showing 11 changed files with 6,718 additions and 153,140 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
.eslintrc.js
.prettierrc.js
.yarn
32 changes: 17 additions & 15 deletions .github/workflows/audit_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ on:
pull_request:
branches: [main, dev]

concurrency:
group:
'${{ github.workflow }} @ ${{ github.event.pull_request.head.label ||
github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
audit:
# run only on main/dev branch and pull requests
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.event_name == 'pull_request'
runs-on: ubuntu-latest

Expand All @@ -16,17 +21,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Audit dependencies
run: audit-ci --critical --report-type full

- name: Lockfile lint
run: lockfile-lint -p yarn.lock --type yarn --allowed-hosts yarn --empty-hostname false --validate-https

build:
needs: audit
# run only on audit success or audit skipped
if: always() && (needs.audit.result == 'success' || needs.audit.result == 'skipped')
runs-on: ubuntu-latest

Expand All @@ -35,24 +36,25 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Set yarn cache directory
run: yarn config set cache-folder .yarn-cache
- name: Set pnpm cache directory
run: pnpm config set store-dir .pnpm-store
continue-on-error: true

- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
- name: Setup cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v2
with:
path: |
.yarn-cache
.pnpm-store
node_modules
key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-pnpm-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-v1-
${{ runner.os }}-pnpm-v1-
continue-on-error: true

- name: Install dependencies
run: yarn --frozen-lockfile --prefer-offline --no-audit
run: pnpm install --frozen-lockfile --prefer-offline

- name: Lint
run: yarn lint
run: pnpm lint
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
.eslintrc.js
.prettierrc.js
.yarn
Loading

0 comments on commit 7841e91

Please sign in to comment.