From 2f524bcfec227107261fe702ef484daba0d79b24 Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Sun, 15 May 2022 22:05:00 +0300 Subject: [PATCH] (chore) update CI --- .github/workflows/{validate.yml => ci.yml} | 35 ++++++++++------------ 1 file changed, 15 insertions(+), 20 deletions(-) rename .github/workflows/{validate.yml => ci.yml} (52%) diff --git a/.github/workflows/validate.yml b/.github/workflows/ci.yml similarity index 52% rename from .github/workflows/validate.yml rename to .github/workflows/ci.yml index 3f178fb..97244a7 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: validate +name: ci on: push: branches: ['main'] @@ -9,37 +9,32 @@ jobs: build: name: 'Build' runs-on: ubuntu-latest + strategy: + matrix: + node-version: [15] steps: - name: โฌ‡๏ธ Checkout repo uses: actions/checkout@v2 - - - name: ๐Ÿ’พ Cache node modules - uses: actions/cache@v2 - env: - cache-name: cache-node-modules + - uses: pnpm/action-setup@v2.0.1 with: - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: โŽ” Setup node - uses: actions/setup-node@v1 + version: 7.0.0 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 with: - node-version: '14' + node-version: ${{ matrix.node-version }} + cache: 'pnpm' - name: ๐Ÿ“€ Install dependencies - run: npm install + run: pnpm install - name: ๐Ÿงน Lint - run: npm run lint + run: pnpm run lint - name: ๐Ÿ˜ Prettier check - run: npm run check + run: pnpm run check - name: ๐Ÿงช Test - run: npm run coverage + run: pnpm run coverage - name: โซ Upload coverage uses: coverallsapp/github-action@master @@ -47,7 +42,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿ‘ทโ€โ™€๏ธ Build - run: npm run build + run: pnpm run build - name: โซ Upload build artifacts uses: actions/upload-artifact@v2