use bun for testing in GitHub Actions #127
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: Run tests | |
on: [push, pull_request] | |
concurrency: | |
# the group name is composed of two elements: | |
# 1. this workflow name "run-tests" | |
# 2. the branch name retrieved via the "github.ref" variable | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
bun-version: [1.0.x] | |
name: Bun ${{ matrix.bun-version }} | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Create .env file | |
run: cp .env.example .env | |
- name: Ensure docs directory | |
run: mkdir resources/docs | |
- name: Clone 2.x docs repository | |
uses: actions/checkout@v4 | |
with: | |
repository: supercharge/docs | |
path: resources/docs/2.x | |
ref: 2.x | |
- name: Clone 3.x docs repository | |
uses: actions/checkout@v4 | |
with: | |
repository: supercharge/docs | |
path: resources/docs/3.x | |
ref: 3.x | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
- name: Use Bun ${{ matrix.bun-version }} | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- name: Install dependencies | |
run: bun install | |
- name: Run tests | |
run: bun test | |
env: | |
CI: true |