Skip to content

Commit

Permalink
env: Arrange GitHub action (#347)
Browse files Browse the repository at this point in the history
* env: use setup composit action

* env: define node-version-matrix variable

* fix: remove unused action

* fix: add compisite

* fix: first checkout

* env: fix syntax

* fix: add missing property
  • Loading branch information
JaeYeopHan authored Aug 16, 2024
1 parent 260e0c7 commit 4313479
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 33 deletions.
9 changes: 0 additions & 9 deletions .github/actions/setup-node/action.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Setup
description: Setup development environment
inputs:
node-version-matrix:
required: false
description: you can use matrix strategy
default: 'false'
runs:
using: composite
steps:
- name: Setup Node.js
if: ${{ inputs.node-version-matrix == 'false' }}
uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
- name: Setup Node.js
if: ${{ inputs.node-version-matrix != 'false' }}
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version-matrix }}
- name: Enable corepack
shell: bash
run: corepack enable
- name: Install dependencies
shell: bash
run: yarn install --immutable
6 changes: 2 additions & 4 deletions .github/workflows/build-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
run: yarn install --immutable
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: yarn prebuild && yarn build
working-directory: ./examples/react
6 changes: 2 additions & 4 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
run: yarn install --immutable
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: yarn build
working-directory: ./website
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ jobs:
strategy:
matrix:
node: ['18', '20', '22']
name: CI (Node.js ${{ matrix.node }})
name: Node.js ${{ matrix.node }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: yarn install --immutable
node-version-matrix: ${{ matrix.node }}
- name: Check Type
run: yarn typecheck
- name: Check Lint
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
run: yarn install --immutable
- name: Setup
uses: ./.github/actions/setup
- name: Check Type
run: yarn typecheck
- name: Check Lint
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
run: yarn install --immutable
- name: Setup
uses: ./.github/actions/setup
- name: Run CI
working-directory: packages/calendar
run: yarn run test:playwright
Expand Down

0 comments on commit 4313479

Please sign in to comment.