diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..1df1ace7f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI / Tests + +# Tests coming soon + +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + id-token: write + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Check out code using Git + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup PNPM + uses: pnpm/action-setup@v3 + + - name: Setup Node + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4 + with: + node-version-file: '.node-version' + cache: pnpm + + - name: Install dependencies + run: pnpm ci:install + shell: bash + + - name: Lint code + run: pnpm ci:lint + shell: bash \ No newline at end of file diff --git a/.github/workflows/todo-auto-issue.yml b/.github/workflows/todo-auto-issue.yml index a76cf1e29..14bce6409 100644 --- a/.github/workflows/todo-auto-issue.yml +++ b/.github/workflows/todo-auto-issue.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: importAll: - default: 'false' + default: false required: false type: boolean description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing. diff --git a/package.json b/package.json index 5871361c3..d37650124 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "build": "pnpm --filter node-playground build", "lint": "biome check .", "lint:fix": "biome check --write .", + "ci:lint": "biome ci --formatter-enabled=true --organize-imports-enabled=true --linter-enabled=true --reporter=github", "ci:install": "pnpm install --frozen-lockfile", "ci:version": "pnpm changeset version", "ci:publish": "pnpm changeset publish", diff --git a/tsconfig.json b/tsconfig.json index 1cfa925e1..4e2d59707 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,7 @@ "packages/studiocms_ui/**/*" ], "compilerOptions": { + "baseUrl": ".", "composite": true, "declaration": true, "declarationMap": true,