From e175cfbdc4fefbc041ce5bad1fbc8a8f42515fe1 Mon Sep 17 00:00:00 2001 From: zhongsp Date: Fri, 29 Mar 2024 15:33:33 +0800 Subject: [PATCH] gh action --- .github/workflows/nodejs.yml | 37 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 53e25ee7..c23ed2fe 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,26 +1,19 @@ -name: Node CI - +name: test on: [push] - jobs: - build: - + test: runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x] - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, and test - run: | - npm ci - npm run build --if-present - npm test - env: - CI: true + - name: Check out code + uses: actions/checkout@v2 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - run: yarn install --immutable + - name: Lint TypeScript + run: yarn run test