diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 00ea588..60df308 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,27 +1,27 @@ -#name: Setup -#description: Setup Node.js and install dependencies -# -#runs: -# using: composite -# steps: -# - name: Setup Node.js -# uses: actions/setup-node@v3 -# with: -# node-version-file: .nvmrc -# -# - name: Cache dependencies -# id: yarn-cache -# uses: actions/cache@v3 -# with: -# path: | -# **/node_modules -# .yarn/install-state.gz -# key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} -# restore-keys: | -# ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} -# ${{ runner.os }}-yarn- -# -# - name: Install dependencies -# if: steps.yarn-cache.outputs.cache-hit != 'true' -# run: yarn install --immutable -# shell: bash +name: Setup +description: Setup Node.js and install dependencies + +runs: + using: composite + steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + + - name: Cache dependencies + id: yarn-cache + uses: actions/cache@v4 + with: + path: | + **/node_modules + .yarn/install-state.gz + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} + restore-keys: | + ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + ${{ runner.os }}-yarn- + + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --immutable + shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 097d5ef..3ddfb23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,55 +1,53 @@ -#name: CI -#on: -# push: -# branches: -# - main -# pull_request: -# branches: -# - main -# merge_group: -# types: -# - checks_requested -# -#jobs: -# lint: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# -# - name: Setup -# uses: ./.github/actions/setup -# -# - name: Lint files -# run: yarn lint -# -# - name: Typecheck files -# run: yarn typecheck -# -# test: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# -# - name: Setup -# uses: ./.github/actions/setup -# -# - name: Run unit tests -# run: yarn test --maxWorkers=2 --coverage -# -# build-library: -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# -# - name: Setup -# uses: ./.github/actions/setup -# -# - name: Build package -# run: yarn prepare -# +name: CI +on: + pull_request: + push: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Lint files + run: yarn lint + + - name: Typecheck files + run: yarn typecheck + + - name: Prettier check + run: yarn prettier:check + + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Run unit tests + run: yarn test --maxWorkers=2 --coverage + + build-library: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Build package + run: yarn prepare + # build-android: # runs-on: ubuntu-latest # env: diff --git a/.nvmrc b/.nvmrc index 3f430af..ee09fac 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18 +v20.11.1