fix: ci (#69) #173
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: check | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Setup latest deno version | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Run deno fmt | |
run: deno fmt --check | |
- name: Run deno lint | |
run: deno lint --unstable | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Setup latest deno version | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Run deno task check | |
run: deno task check | |
test: | |
name: test ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest,] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Setup latest deno version | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Setup Bun | |
if: ${{ matrix.os != 'windows-latest' }} | |
uses: oven-sh/setup-bun@v1 | |
- name: Setup Python (Windows) | |
uses: actions/setup-python@v2 | |
if: ${{ matrix.os == 'windows-latest' }} | |
with: | |
python-version: '3.12' | |
- name: Install NumPy | |
if: ${{ matrix.os != 'macos-latest' }} | |
run: python3 -m pip install numpy | |
- name: Install NumPy on MacOs | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: python3 -m pip install --user --break-system-packages numpy | |
- name: Run deno test | |
run: deno task test | |
- name: Run bun test | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: bun test |