From bf8882dd4ae395f3cc622d79229f56827cde301b Mon Sep 17 00:00:00 2001 From: Cristiano Tofani Date: Mon, 3 Jul 2023 15:30:38 +0200 Subject: [PATCH] Adds simple checks on PR --- .github/actions/setup/action.yml | 4 ++-- .github/workflows/checks.yml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/checks.yml diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d402f3d5..06c04ee9 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -5,13 +5,13 @@ runs: using: composite steps: - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: node-version-file: .nvmrc - name: Cache dependencies id: yarn-cache - uses: actions/cache@v3 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: path: | **/node_modules diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 00000000..8ed7fbf0 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,18 @@ +name: Checks +on: + - pull_request +jobs: + checks: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-pr-staticcheck-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + steps: + - id: checkout + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: setup + uses: ./.github/actions/setup + - id: tsc + run: yarn typecheck + - id: lint + run: yarn lint \ No newline at end of file