mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-07-20 13:38:28 +02:00
feat: add input for bun-version-file
This commit is contained in:
parent
8f24390df0
commit
f83767c0cf
4 changed files with 116 additions and 16 deletions
46
.github/workflows/test.yml
vendored
46
.github/workflows/test.yml
vendored
|
@ -85,6 +85,7 @@ jobs:
|
|||
echo "Expected version to be 1.1.0, got ${{ steps.bun.outputs.version }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup-bun-from-tool-versions:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
@ -99,10 +100,51 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup package.json
|
||||
|
||||
- name: Setup .tool-versions
|
||||
shell: bash
|
||||
run: |
|
||||
echo "bun ${{ matrix.content }}" > .tool-versions
|
||||
echo "${{ matrix.content }}" > .tool-versions
|
||||
|
||||
- name: Setup Bun
|
||||
uses: ./
|
||||
|
||||
- name: Run Bun
|
||||
id: bun
|
||||
shell: bash
|
||||
run: |
|
||||
bun --version
|
||||
echo "version=$(bun --version)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check version
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ steps.bun.outputs.version }}" == "1.1.0" ]]; then
|
||||
echo "Version is 1.1.0"
|
||||
else
|
||||
echo "Expected version to be 1.1.0, got ${{ steps.bun.outputs.version }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setup-bun-from-bumrc:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
content:
|
||||
- "1.1.0"
|
||||
- "latest"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .bumrc
|
||||
shell: bash
|
||||
run: |
|
||||
echo "${{ matrix.content }}" > .bumrc
|
||||
|
||||
- name: Setup Bun
|
||||
uses: ./
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue