diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e39bcc4..e1af245 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,8 +3,16 @@ name: CI on: push: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - '**/*.md' pull_request: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - '**/*.md' workflow_dispatch: {} concurrency: @@ -13,7 +21,7 @@ concurrency: jobs: build: - name: Build & Lint + name: Build runs-on: ubuntu-latest steps: @@ -38,5 +46,28 @@ jobs: - name: Build run: pnpm build + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup pnpm + uses: pnpm/action-setup@v6 + + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: '22' + cache: 'pnpm' + + - name: Generate function packages + run: node --experimental-strip-types scripts/generate.ts + + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Lint run: pnpm lint diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index c8c6023..f6e740c 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -3,8 +3,18 @@ name: Publish Docker Images on: push: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - 'tests/**' + - '**/*.md' pull_request: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - 'tests/**' + - '**/*.md' workflow_dispatch: {} permissions: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 84b9f03..1866baf 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,8 +3,16 @@ name: Tests on: push: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - '**/*.md' pull_request: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - '**/*.md' workflow_dispatch: {} concurrency: @@ -23,7 +31,7 @@ jobs: node-version: '22' cache: 'pnpm' - run: node --experimental-strip-types scripts/generate.ts - - run: pnpm install + - run: pnpm install --frozen-lockfile - run: pnpm test:unit integration: @@ -37,7 +45,7 @@ jobs: node-version: '22' cache: 'pnpm' - run: node --experimental-strip-types scripts/generate.ts - - run: pnpm install + - run: pnpm install --frozen-lockfile - run: pnpm build - run: pnpm test:integration @@ -52,7 +60,7 @@ jobs: node-version: '22' cache: 'pnpm' - run: node --experimental-strip-types scripts/generate.ts - - run: pnpm install + - run: pnpm install --frozen-lockfile - name: Build toolkit packages run: | pnpm --filter @constructive-io/fn-types build @@ -66,26 +74,3 @@ jobs: pnpm --filter @constructive-io/fn-generator test pnpm --filter @constructive-io/fn-client test pnpm --filter @constructive-io/fn-cli test - - fn-init-e2e: - name: fn init end-to-end - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: pnpm/action-setup@v6 - - uses: actions/setup-node@v5 - with: - node-version: '22' - cache: 'pnpm' - - run: node --experimental-strip-types scripts/generate.ts - - run: pnpm install - - name: Build fn-cli (transitive) - run: | - pnpm --filter @constructive-io/fn-types build - pnpm --filter @constructive-io/knative-job-fn build - pnpm --filter @constructive-io/fn-runtime build - pnpm --filter @constructive-io/fn-generator build - pnpm --filter @constructive-io/fn-client build - pnpm --filter @constructive-io/fn-cli build - - name: Binary integration test - run: pnpm exec jest tests/integration/fn-init.test.ts