From 6445c428d0f8573ff662cd3bb56dc331ba9a03a2 Mon Sep 17 00:00:00 2001 From: Cong-Cong Pan Date: Tue, 5 Mar 2024 15:07:46 +0800 Subject: [PATCH] chore: run test in ci (#42) --- .editorconfig | 3 +++ .github/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.editorconfig b/.editorconfig index 190d701..e5324b7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,6 @@ end_of_line = lf insert_final_newline = true indent_style = space indent_size = 4 + +[*.yaml] +indent_size = 2 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..d6410a7 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,30 @@ +name: CI + +on: + pull_request: + types: [ opened, synchronize ] + push: + branches: [ main ] + +jobs: + build: + 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@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Install dependencies + run: yarn + + - name: Run Jest tests + run: yarn test