Skip to content

Commit

Permalink
Remove volta for corepack (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
gossi authored Oct 28, 2024
1 parent d802fe9 commit 1db41b4
Show file tree
Hide file tree
Showing 8 changed files with 10,063 additions and 7,847 deletions.
28 changes: 28 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Setup"
# inputs:
# who-to-greet: # id of input
# description: 'Who to greet'
# required: true
# default: 'World'
runs:
using: "composite"
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "pnpm"
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
# necessary for publish
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: pnpm install
shell: bash

- name: Build package
run: pnpm build
shell: bash
83 changes: 41 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,58 @@ on:
branches:
- main
- "v*"
# always run CI for tags
tags:
- "*"

# early issue detection: run CI weekly on Sundays
schedule:
- cron: "0 6 * * 0"
jobs:
lint-js:
name: lint:js
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- run: pnpm run -r --parallel --aggregate-output lint:js

env:
CI: true
lint-css:
name: lint:css
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- run: pnpm run -r --parallel --aggregate-output lint:css

jobs:
test-locked-deps:
name: Locked Deps
runs-on: ubuntu-20.04
lint-hbs:
name: lint:hbs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: wyvox/action@v1
- name: Build package
run: pnpm --filter ember-link build
- name: Lint JS
run: pnpm run -r --parallel --aggregate-output lint:js
- name: Lint Types
run: pnpm run -r --parallel --aggregate-output lint:types
- name: Lint Handlebars
run: pnpm run -r --parallel --aggregate-output lint:hbs
- name: Tests
run: pnpm run -r --parallel --aggregate-output test
uses: ./.github/actions/setup
- run: pnpm run -r --parallel --aggregate-output lint:hbs

test-floating-deps:
name: Floating Deps
runs-on: ubuntu-20.04
lint-types:
name: lint:types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- run: pnpm run -r --parallel --aggregate-output lint:types

test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: wyvox/action@v1
with:
pnpm-args: --no-frozen-lockfile
- name: Build package
run: pnpm --filter ember-link build
- name: Lint JS
run: pnpm run -r --parallel --aggregate-output lint:js
- name: Lint Types
run: pnpm run -r --parallel --aggregate-output lint:types
- name: Lint Handlebars
run: pnpm run -r --parallel --aggregate-output lint:hbs
- name: Tests
uses: ./.github/actions/setup
- name: Test
run: pnpm run -r --parallel --aggregate-output test

test-try:
name: Ember Try
runs-on: ubuntu-20.04
needs: [test-locked-deps]
needs: [test]

strategy:
fail-fast: false
Expand All @@ -79,10 +79,9 @@ jobs:
- embroider-safe
- embroider-optimized
steps:
- uses: actions/checkout@v4
- name: Setup
uses: wyvox/action@v1
- name: Build package
run: pnpm --filter ember-link build
uses: ./.github/actions/setup
- name: Try Scenario
run: pnpm exec ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: wyvox/action@v1
uses: ./.github/actions/setup
- name: Build Docs
run: pnpm build:docs
- name: Setup Pages
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
5 changes: 1 addition & 4 deletions ember-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"typescript": "^5.3.3"
},
"engines": {
"node": ">= 16.*"
"node": ">= 20.*"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand All @@ -100,8 +100,5 @@
"main": "addon-main.cjs",
"type": "addon",
"version": 2
},
"volta": {
"extends": "../package.json"
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
"concurrently": "^8.2.2",
"vitepress": "^1.0.0-rc.41"
},
"volta": {
"node": "20.11.0"
"packageManager": "[email protected]",
"engines": {
"node": ">=20.*"
},
"pnpm": {
"peerDependencyRules": {
Expand Down
Loading

0 comments on commit 1db41b4

Please sign in to comment.