From 8f71319a90f7d170601394cec12d13638a7384f6 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 | 33 +++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 37 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..c015f91 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,33 @@ +name: CI + +on: + pull_request: + types: [ opened, synchronize ] + push: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.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: Build + run: yarn build + + - name: Run Jest tests + run: yarn test diff --git a/package.json b/package.json index eb5bbbf..94fba12 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ ], "scripts": { "lerna": "lerna", + "build": "lerna run build --stream", "test": "jest" }, "engines": {