mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-17 20:18:24 +02:00
feat: support for multiple registries (#109)
Some checks failed
autofix.ci / format (push) Failing after 1m14s
🧪 Test / remove-cache (push) Successful in 58s
🧪 Test / setup-bun (1.x, ubuntu-latest) (push) Failing after 1m28s
🧪 Test / setup-bun (< 2, ubuntu-latest) (push) Failing after 1m28s
🧪 Test / setup-bun from (ubuntu-latest, .tool-versions (bun 1.1.0)) (push) Successful in 57s
🧪 Test / setup-bun from (ubuntu-latest, .tool-versions (bun1.1.0)) (push) Successful in 57s
🧪 Test / setup-bun from (ubuntu-latest, /foo/package.json (bun@1.1.0)) (push) Failing after 55s
🧪 Test / setup-bun from (ubuntu-latest, package.json (bun@1.1.0)) (push) Successful in 57s
🧪 Test / setup-bun from (ubuntu-latest, package.json (yarn@bun@1.1.0)) (push) Successful in 58s
🧪 Test / test installing deps from custom registries (ubuntu-latest) (push) Failing after 3m12s
🧪 Test / Tests (push) Successful in 3m13s
🧪 Test / setup-bun (1, ubuntu-latest) (push) Failing after 1m28s
🧪 Test / setup-bun (1.1.0, ubuntu-latest) (push) Successful in 56s
🧪 Test / setup-bun (> 1.0.0, ubuntu-latest) (push) Failing after 1m27s
🧪 Test / setup-bun (canary, ubuntu-latest) (push) Successful in 1m1s
🧪 Test / setup-bun (latest, ubuntu-latest) (push) Successful in 58s
🧪 Test / setup-bun from (ubuntu-latest, .bumrc (1.1.0)) (push) Successful in 56s
🧪 Test / setup-bun from (ubuntu-latest, .bun-version (1.1.0)) (push) Successful in 57s
🧪 Test / setup-bun from (ubuntu-latest, .tool-versions (bun 1.1.0)) (push) Successful in 56s
🧪 Test / setup-bun from (ubuntu-latest, download url) (push) Successful in 59s
🧪 Test / setup-bun (latest, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .tool-versions (bun1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, download url) (push) Has been cancelled
🧪 Test / setup-bun (1, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (1, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (1.1.0, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (1.1.0, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (1.x, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (1.x, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (< 2, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (< 2, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (> 1.0.0, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (> 1.0.0, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (canary, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (canary, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (latest, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .bumrc (1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .bumrc (1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .bun-version (1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .bun-version (1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .tool-versions (bun 1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .tool-versions (bun 1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .tool-versions (bun 1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .tool-versions (bun 1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .tool-versions (bun1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, /foo/package.json (bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, /foo/package.json (bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, package.json (bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, package.json (bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, package.json (yarn@bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, package.json (yarn@bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, download url) (push) Has been cancelled
Some checks failed
autofix.ci / format (push) Failing after 1m14s
🧪 Test / remove-cache (push) Successful in 58s
🧪 Test / setup-bun (1.x, ubuntu-latest) (push) Failing after 1m28s
🧪 Test / setup-bun (< 2, ubuntu-latest) (push) Failing after 1m28s
🧪 Test / setup-bun from (ubuntu-latest, .tool-versions (bun 1.1.0)) (push) Successful in 57s
🧪 Test / setup-bun from (ubuntu-latest, .tool-versions (bun1.1.0)) (push) Successful in 57s
🧪 Test / setup-bun from (ubuntu-latest, /foo/package.json (bun@1.1.0)) (push) Failing after 55s
🧪 Test / setup-bun from (ubuntu-latest, package.json (bun@1.1.0)) (push) Successful in 57s
🧪 Test / setup-bun from (ubuntu-latest, package.json (yarn@bun@1.1.0)) (push) Successful in 58s
🧪 Test / test installing deps from custom registries (ubuntu-latest) (push) Failing after 3m12s
🧪 Test / Tests (push) Successful in 3m13s
🧪 Test / setup-bun (1, ubuntu-latest) (push) Failing after 1m28s
🧪 Test / setup-bun (1.1.0, ubuntu-latest) (push) Successful in 56s
🧪 Test / setup-bun (> 1.0.0, ubuntu-latest) (push) Failing after 1m27s
🧪 Test / setup-bun (canary, ubuntu-latest) (push) Successful in 1m1s
🧪 Test / setup-bun (latest, ubuntu-latest) (push) Successful in 58s
🧪 Test / setup-bun from (ubuntu-latest, .bumrc (1.1.0)) (push) Successful in 56s
🧪 Test / setup-bun from (ubuntu-latest, .bun-version (1.1.0)) (push) Successful in 57s
🧪 Test / setup-bun from (ubuntu-latest, .tool-versions (bun 1.1.0)) (push) Successful in 56s
🧪 Test / setup-bun from (ubuntu-latest, download url) (push) Successful in 59s
🧪 Test / setup-bun (latest, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .tool-versions (bun1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, download url) (push) Has been cancelled
🧪 Test / setup-bun (1, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (1, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (1.1.0, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (1.1.0, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (1.x, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (1.x, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (< 2, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (< 2, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (> 1.0.0, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (> 1.0.0, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (canary, macos-latest) (push) Has been cancelled
🧪 Test / setup-bun (canary, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun (latest, windows-latest) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .bumrc (1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .bumrc (1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .bun-version (1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .bun-version (1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .tool-versions (bun 1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .tool-versions (bun 1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, .tool-versions (bun 1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .tool-versions (bun 1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, .tool-versions (bun1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, /foo/package.json (bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, /foo/package.json (bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, package.json (bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, package.json (bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, package.json (yarn@bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (windows-latest, package.json (yarn@bun@1.1.0)) (push) Has been cancelled
🧪 Test / setup-bun from (macos-latest, download url) (push) Has been cancelled
* feat: support for multiple registries * [autofix.ci] apply automated fixes * refactor: drop unnecessary check * fix: pass empty array instead undefined * [autofix.ci] apply automated fixes * fix: dont add registry set line * [autofix.ci] apply automated fixes * feat: few more tests * feat: add bun types * docs: explain registries * feat: save globally * [autofix.ci] apply automated fixes * ci: jsr registry test * ci: add , * ci: test * ci: test * ci: test * ci: test * [autofix.ci] apply automated fixes * feat: use @iarna/toml * [autofix.ci] apply automated fixes * feat: registry parsing * [autofix.ci] apply automated fixes * ci: verbose add * ci: registry install check * ci: registry install check * ci: registry install check * ci: verify registry usage * docs: registries * docs: important block * docs: show table * docs: show table * ci: shell * ci: registry test on linux * ci: registry test on linux * build: text lockfile --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
7c641390eb
commit
34f777aec1
14 changed files with 901 additions and 117 deletions
66
.github/workflows/test.yml
vendored
66
.github/workflows/test.yml
vendored
|
@ -23,10 +23,26 @@ jobs:
|
|||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: ./
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Run tests
|
||||
run: bun test --coverage
|
||||
|
||||
setup-bun:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache]
|
||||
needs: [remove-cache, tests]
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -65,7 +81,7 @@ jobs:
|
|||
name: setup-bun from (${{ matrix.os }}, ${{ matrix.file.name }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache]
|
||||
needs: [remove-cache, tests]
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
|
@ -130,7 +146,7 @@ jobs:
|
|||
name: setup-bun from (${{ matrix.os }}, download url)
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache]
|
||||
needs: [remove-cache, tests]
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -153,3 +169,47 @@ jobs:
|
|||
id: run_bun
|
||||
run: |
|
||||
bun --version
|
||||
|
||||
test-custom-registries:
|
||||
name: test installing deps from custom registries (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: true
|
||||
needs: [remove-cache, tests]
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🛠️ Setup Bun
|
||||
uses: ./
|
||||
id: setup_bun
|
||||
with:
|
||||
registries: |
|
||||
https://registry.npmjs.org
|
||||
@types:https://registry.yarnpkg.com
|
||||
|
||||
- name: ▶️ Install from default registry
|
||||
run: |
|
||||
output=$(bun add is-odd --verbose --force 2>&1)
|
||||
|
||||
if echo "$output" | grep -q "HTTP/1.1 GET https://registry.npmjs.org/is-odd"; then
|
||||
echo "Successfully installed from default registry"
|
||||
else
|
||||
echo "Failed to install from default registry"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: ▶️ Install from @types registry
|
||||
run: |
|
||||
output=$(bun add @types/bun --verbose --force 2>&1)
|
||||
|
||||
if echo "$output" | grep -q "HTTP/1.1 GET https://registry.yarnpkg.com/@types%2fbun"; then
|
||||
echo "Successfully installed from @types registry"
|
||||
else
|
||||
echo "Failed to install from @types registry"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue