build: 📦 use bun as package manager #8271
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test & Release | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Build | |
run: bun nx affected --base=last-release --target=build | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Lint | |
run: bun nx affected --base=last-release --target=lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node_version: [ 20 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node_version: ${{ matrix.node_version }} | |
- name: Test | |
run: bun nx affected --base=last-release --target=test | |
component-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Install Playwright Browsers | |
run: bun playwright install --with-deps | |
- name: Component Test | |
run: bun nx affected --base=last-release --target=component-test --parallel=1 | |
- name: Upload test results on failure | |
uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: test-results | |
path: test-results | |
e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: E2E | |
run: bun nx affected --base=last-release --target=e2e --parallel=1 | |
release: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- build | |
- lint | |
- test | |
- component-test | |
- e2e | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
git_bot_token: ${{ secrets.GIT_BOT_TOKEN }} | |
- name: Release | |
uses: ./.github/actions/release | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
npm_token: ${{ secrets.NPM_TOKEN }} |