Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
flyfishzy committed Jan 24, 2024
1 parent e2ad084 commit 7a87c16
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
push:
branches:
- '**'
pull_request:
branches:
- main

# Declare default permissions as read only.
permissions: read-all

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
node_version: [20]
fail-fast: false

name: 'Build: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'

- name: Init git submodule
run: git submodule init && git submodule update

- name: Install deps
run: pnpm install

- name: Run benchmark
run: node index.js

0 comments on commit 7a87c16

Please sign in to comment.