From c463de0db97456802644bd280bdc79f4cf0db8ca Mon Sep 17 00:00:00 2001 From: Teemu Taskula Date: Tue, 20 Jun 2023 23:08:15 +0300 Subject: [PATCH] Update github actions --- .github/workflows/main.yml | 76 +++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11023c2..7589bbb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,42 +1,58 @@ name: CI on: [push] jobs: - build: + lint: + name: ⬣ ESLint runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v3 + + - name: ⎔ Setup node + uses: actions/setup-node@v3 + with: + cache: 'yarn' + node-version: 18 + + - name: 📥 Install deps + run: yarn + + - name: 🔬 Lint + run: yarn lint + typecheck: + name: ʦ TypeScript + runs-on: ubuntu-latest steps: - - name: Begin CI... - uses: actions/checkout@v2 + - name: ⬇️ Checkout repo + uses: actions/checkout@v3 - - name: Use Node 12 - uses: actions/setup-node@v1 + - name: ⎔ Setup node + uses: actions/setup-node@v3 with: - node-version: 12.x + cache: 'yarn' + node-version: 18 + + - name: 📥 Install deps + run: yarn + + - name: 🔎 Type check + run: yarn typecheck + test: + name: 🧪 Jest + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v3 - - name: Use cached node_modules - uses: actions/cache@v1 + - name: ⎔ Setup node + uses: actions/setup-node@v3 with: - path: node_modules - key: nodeModules-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - nodeModules- + cache: 'yarn' + node-version: 18 - - name: Install dependencies - run: yarn install --frozen-lockfile - env: - CI: true + - name: 📥 Install deps + run: yarn - - name: Lint - run: yarn lint - env: - CI: true - - - name: Test - run: yarn test --ci --coverage --maxWorkers=2 - env: - CI: true - - - name: Build - run: yarn build - env: - CI: true + - name: 🔬 Test + run: yarn test