bun.sh compatibility & bun CI #2473
Workflow file for this run
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 | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
pull_request: | |
jobs: | |
test-node: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: | | |
corepack enable && pnpm install | |
- name: Build | |
run: | | |
pnpm --filter megalodon run build | |
- name: Testing | |
run: | | |
pnpm --filer megalodon run test | |
test-bun: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
bun-version: ['latest'] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- name: Install dependencies | |
run: | | |
bun install | |
- name: Build (Bun) | |
run: cd megalodon && bun run build:bun-node && bun run build:bun | |
- name: Testing (Bun) | |
run: cd megalodon && bun run test | |
- name: Browser example (Bun) | |
run: cd example/browser && bun run build:bun-node && bun run build:bun | |
- name: Typescript example (Bun) | |
run: | | |
cd megalodon && bun run test | |
example: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: | | |
yarn install | |
- name: Build | |
run: | | |
yarn workspace megalodon run build | |
pnpm --filter megalodon run test | |
- name: Browser example | |
run: | | |
pnpm --filter browser run build | |
- name: Typescript example | |
env: | |
MASTODON_URL: https://fedibird.com | |
PLEROMA_URL: https://pleroma.io | |
FIREFISH_URL: https://cybre.club | |
FRIENDICA_URL: https://squeet.me | |
run: | | |
pnpm --filter example run build | |
node example/typescript/dist/mastodon/instance.js | |
node example/typescript/dist/pleroma/instance.js | |
node example/typescript/dist/firefish/instance.js | |
node example/typescript/dist/friendica/instance.js | |
example-bun: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
bun-version: ['latest'] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- name: Install dependencies | |
run: | | |
bun install | |
- name: Build (Bun) | |
run: cd megalodon && bun run build:bun-node && bun run build:bun | |
- name: Testing (Bun) | |
run: cd megalodon && bun run test | |
- name: Browser example (Bun) | |
run: cd example/browser && bun run build:bun-node && bun run build:bun | |
- name: Typescript example (Bun) | |
run: cd example/typescript && bun run build:bun-node && bun run build:bun | |
bun run example/typescript/dist/mastodon/instance.js | |
bun run example/typescript/dist/pleroma/instance.js | |
bun run example/typescript/dist/firefish/instance.js | |
bun run example/typescript/dist/friendica/instance.js |