diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..2e9c45a9 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,24 @@ +name: Lint + +on: + workflow_call: + workflow_dispatch: + +jobs: + lint-js: + name: Lint + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Node + uses: actions/setup-node@v4 + + - name: Install npm dependencies + run: yarn install --frozen-lockfile + + - name: Lint + run: yarn lint diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d50e994b..a25e987e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -32,3 +32,11 @@ jobs: test-android-unit: name: Test uses: ./.github/workflows/test-android-unit.yml + + lint: + name: Check + uses: ./.github/workflows/lint.yml + + typecheck: + name: Check + uses: ./.github/workflows/typecheck.yml diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 00000000..88066026 --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,24 @@ +name: Types + +on: + workflow_call: + workflow_dispatch: + +jobs: + lint-js: + name: Types + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Node + uses: actions/setup-node@v4 + + - name: Install npm dependencies + run: yarn install --frozen-lockfile + + - name: Lint + run: yarn typecheck diff --git a/package.json b/package.json index 48c3c40d..08d6ddc7 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "emulator": "bash ./scripts/start-android-emulator.sh", "maestro:ios": "maestro test --include-tags=ios .maestro/", "maestro:android": "maestro test --include-tags=android .maestro/", - "typecheck": "yarn tsc" + "typecheck": "yarn tsc", + "lint": "yarn eslint ./src" }, "repository": { "type": "git",