Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore(repo): Cachable Yarn installs #1554

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,23 @@ jobs:
strategy:
matrix:
# supporting primarily LTS
# There is a problem in colliding installation of dependencies
# do not know yet, what is causing this, but any combination except 18 is not working corectly
# @TODO: https://jira.almacareer.tech/browse/DS-1402
# node-version: [18, 20, 22]
node-version: [18]
node-version: [18, 20, 22]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Enable Corepack
run: corepack enable

- name: Fetch Git history
run: git fetch --no-tags --depth=50 origin main
- name: Configure Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
uses: bahmutov/[email protected]
literat marked this conversation as resolved.
Show resolved Hide resolved
with:
useRollingCache: true
install-command: yarn --immutable
run: yarn --immutable --inline-builds

- name: Build packages
run: yarn build
17 changes: 6 additions & 11 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Enable Corepack
run: corepack enable

- name: Fetch Git history
run: git fetch --no-tags --depth=50 origin main
- name: Configure Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
uses: bahmutov/[email protected]
with:
useRollingCache: true
install-command: yarn --immutable
run: yarn --immutable --inline-builds

- name: Run Commitlint
run: npx commitlint --color --verbose --from $(git merge-base origin/main HEAD)
12 changes: 5 additions & 7 deletions .github/workflows/component-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ jobs:
# Omlet.dev uses Git History for analysis; Disable shallow clone
fetch-depth: 0

- name: Enable Corepack
run: corepack enable

- name: Configure Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Enable Corepack
run: corepack enable
cache: 'yarn'

- name: Install dependencies
uses: bahmutov/[email protected]
with:
useRollingCache: true
install-command: yarn --immutable
run: yarn --immutable --inline-builds

- name: Analyze
run: npx omlet analyze
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Node
- name: Enable Corepack
run: corepack enable
literat marked this conversation as resolved.
Show resolved Hide resolved

- name: Configure Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Enable Corepack
run: corepack enable
cache: 'yarn'

- name: Install dependencies
uses: bahmutov/[email protected]
with:
useRollingCache: true
install-command: yarn --immutable
run: yarn --immutable --inline-builds

# Wait for the Netlify preview URL to be ready
- name: Wait for Netlify Deploy
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ jobs:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Node.js
- name: Enable Corepack
run: corepack enable

- name: Configure Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Enable Corepack
run: corepack enable
cache: 'yarn'

- name: Install dependencies
uses: bahmutov/[email protected]
with:
useRollingCache: true
install-command: yarn --immutable
run: yarn --immutable --inline-builds

- name: Build
run: yarn build
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/test-web-twig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Node
- name: Enable Corepack
run: corepack enable

- name: Configure Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Enable Corepack
run: corepack enable
cache: 'yarn'

- name: Install dependencies
uses: bahmutov/[email protected]
with:
useRollingCache: true
install-command: yarn --immutable
run: yarn --immutable --inline-builds

- name: Build Icons
working-directory: ./packages/icons
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
- name: Enable Corepack
run: corepack enable

- name: Configure Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Enable Corepack
run: corepack enable
cache: 'yarn'

- name: Fetch Git history
run: git fetch --no-tags --depth=50 origin main

- name: Install dependencies
uses: bahmutov/[email protected]
with:
useRollingCache: true
install-command: yarn --immutable
run: yarn --immutable --inline-builds

- name: Build
run: yarn build
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ help: ## Outputs this help screen
## —— Dependencies 📦 ——————————————————————————————————————————————————————————————

install: ## Install dependencies
corepack enable
$(PKG_MANAGER) $(PKG_MANAGER_INSTALL) $(PKG_MANAGER_FLAGS) && touch node_modules

outdated: ## List outdated dependencies
Expand Down
Loading