Skip to content

Commit 175fa12

Browse files
committed
chore: configure CI
1 parent 1061ff2 commit 175fa12

File tree

3 files changed

+78
-80
lines changed

3 files changed

+78
-80
lines changed

.github/actions/setup/action.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
#name: Setup
2-
#description: Setup Node.js and install dependencies
3-
#
4-
#runs:
5-
# using: composite
6-
# steps:
7-
# - name: Setup Node.js
8-
# uses: actions/setup-node@v3
9-
# with:
10-
# node-version-file: .nvmrc
11-
#
12-
# - name: Cache dependencies
13-
# id: yarn-cache
14-
# uses: actions/cache@v3
15-
# with:
16-
# path: |
17-
# **/node_modules
18-
# .yarn/install-state.gz
19-
# key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
20-
# restore-keys: |
21-
# ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22-
# ${{ runner.os }}-yarn-
23-
#
24-
# - name: Install dependencies
25-
# if: steps.yarn-cache.outputs.cache-hit != 'true'
26-
# run: yarn install --immutable
27-
# shell: bash
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v4
9+
with:
10+
node-version-file: .nvmrc
11+
12+
- name: Cache dependencies
13+
id: yarn-cache
14+
uses: actions/cache@v4
15+
with:
16+
path: |
17+
**/node_modules
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install dependencies
25+
if: steps.yarn-cache.outputs.cache-hit != 'true'
26+
run: yarn install --immutable
27+
shell: bash

.github/workflows/ci.yml

Lines changed: 50 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,53 @@
1-
#name: CI
2-
#on:
3-
# push:
4-
# branches:
5-
# - main
6-
# pull_request:
7-
# branches:
8-
# - main
9-
# merge_group:
10-
# types:
11-
# - checks_requested
12-
#
13-
#jobs:
14-
# lint:
15-
# runs-on: ubuntu-latest
16-
# steps:
17-
# - name: Checkout
18-
# uses: actions/checkout@v3
19-
#
20-
# - name: Setup
21-
# uses: ./.github/actions/setup
22-
#
23-
# - name: Lint files
24-
# run: yarn lint
25-
#
26-
# - name: Typecheck files
27-
# run: yarn typecheck
28-
#
29-
# test:
30-
# runs-on: ubuntu-latest
31-
# steps:
32-
# - name: Checkout
33-
# uses: actions/checkout@v3
34-
#
35-
# - name: Setup
36-
# uses: ./.github/actions/setup
37-
#
38-
# - name: Run unit tests
39-
# run: yarn test --maxWorkers=2 --coverage
40-
#
41-
# build-library:
42-
# runs-on: ubuntu-latest
43-
# steps:
44-
# - name: Checkout
45-
# uses: actions/checkout@v3
46-
#
47-
# - name: Setup
48-
# uses: ./.github/actions/setup
49-
#
50-
# - name: Build package
51-
# run: yarn prepare
52-
#
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
lint:
10+
runs-on: default-runner
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup
16+
uses: ./.github/actions/setup
17+
18+
- name: Lint files
19+
run: yarn lint
20+
21+
- name: Typecheck files
22+
run: yarn typecheck
23+
24+
- name: Prettier check
25+
run: yarn prettier:check
26+
27+
test:
28+
runs-on: default-runner
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Setup
34+
uses: ./.github/actions/setup
35+
36+
- name: Run unit tests
37+
run: yarn test --maxWorkers=2 --coverage
38+
39+
build-library:
40+
runs-on: default-runner
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Setup
46+
uses: ./.github/actions/setup
47+
48+
- name: Build package
49+
run: yarn prepare
50+
5351
# build-android:
5452
# runs-on: ubuntu-latest
5553
# env:

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v20.11.1

0 commit comments

Comments
 (0)