Refactor code #4836
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: π οΈ Build + Test | |
on: | |
push: | |
paths: | |
- 'build/**' | |
- 'icons/*.svg' | |
- 'patches/**' | |
- 'src/**' | |
- '.bun-version' | |
- 'bunfig.toml' | |
- 'package.json' | |
- 'sheriff.config.ts' | |
- '!*.md' | |
pull_request: | |
paths: | |
- 'build/**' | |
- 'icons/*.svg' | |
- 'patches/**' | |
- 'src/**' | |
- '.bun-version' | |
- 'bunfig.toml' | |
- 'package.json' | |
- 'sheriff.config.ts' | |
- '!*.md' | |
permissions: | |
contents: read | |
pull-requests: write | |
issues: write # Update issue labels | |
jobs: | |
build-and-test: | |
name: Build & Test Extension | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: π§ Setup Bun | |
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2 | |
with: | |
bun-version-file: ".bun-version" | |
- name: π¦ Install dependencies | |
run: bun install --frozen-lockfile | |
- name: π Test + Build | |
id: build | |
run: | | |
bun test | |
bun run vscode:prepublish | |
- name: π·οΈ Manage label based on build result | |
if: ${{ always() && github.event_name == 'pull_request' }} | |
run: .github/scripts/update-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.build.outcome }} "β failed build" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |