Skip to content

chore: update ci/cd to use latest cache action, and use Bun instead #1

chore: update ci/cd to use latest cache action, and use Bun instead

chore: update ci/cd to use latest cache action, and use Bun instead #1

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install
- name: Run lint
run: bun run lint
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
key: ${{ matrix.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ matrix.os }}-bun-
- name: Install dependencies
run: bun install
- name: Run tests
run: bun run test
# - name: Upload coverage reports
# if: matrix.os == 'ubuntu-latest'
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: true