diff --git a/.github/actions/setup-project/action.yaml b/.github/actions/setup-project/action.yaml new file mode 100644 index 0000000..84a9303 --- /dev/null +++ b/.github/actions/setup-project/action.yaml @@ -0,0 +1,15 @@ +name: 'Setup project' +description: 'Install Node.js, dependencies' + +runs: + using: 'composite' + steps: + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'yarn' + + - name: Install dependencies + run: yarn install + shell: bash diff --git a/.github/workflows/run-compile-check.yaml b/.github/workflows/run-compile-check.yaml new file mode 100644 index 0000000..ac0d354 --- /dev/null +++ b/.github/workflows/run-compile-check.yaml @@ -0,0 +1,19 @@ +name: Check if code can be compiled + +on: + workflow_call: + workflow_dispatch: + +jobs: + run-compile-check: + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up project + uses: ./.github/actions/setup-project + + - name: Run compile check + run: yarn tsc --noEmit