diff --git a/.github/workflows/format-check.yaml b/.github/workflows/format-check.yaml new file mode 100644 index 0000000..0a0ce20 --- /dev/null +++ b/.github/workflows/format-check.yaml @@ -0,0 +1,38 @@ +name: Format Check + +on: + push: + branches: + - "*" + +jobs: + format-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache pnpm modules + id: cache-modules + uses: actions/cache@v2 + with: + path: | + ~/.pnpm-store + **/node_modules + key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'rollup.config.js') }} + restore-keys: | + ${{ runner.os }}- + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.1 + with: + version: latest + run_install: false + + - name: Install Packages + if: steps.cache-modules.outputs.cache-hit != 'true' + run: pnpm install --no-frozen-lockfile + + - name: Format Check + run: pnpm format:check diff --git a/.github/workflows/typecheck.yaml b/.github/workflows/typecheck.yaml new file mode 100644 index 0000000..b49413e --- /dev/null +++ b/.github/workflows/typecheck.yaml @@ -0,0 +1,38 @@ +name: Typecheck + +on: + push: + branches: + - '*' + +jobs: + typecheck: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Cache pnpm modules + id: cache-modules + uses: actions/cache@v2 + with: + path: | + ~/.pnpm-store + **/node_modules + key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'rollup.config.js') }} + restore-keys: | + ${{ runner.os }}- + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.1 + with: + version: latest + run_install: false + + - name: Install Packages + if: steps.cache-modules.outputs.cache-hit != 'true' + run: pnpm install --no-frozen-lockfile + + - name: Typecheck + run: pnpm typecheck