Skip to content

Migrate to pnpm

Migrate to pnpm #2140

Workflow file for this run

name: ts
on:
push:
branches: [main]
paths:
- src/**
- tests/**
- '*.json'
- '*.yaml'
- .github/workflows/ts.yaml
pull_request:
branches: [main]
paths:
- src/**
- tests/**
- '*.json'
- '*.yaml'
- .github/workflows/ts.yaml
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm lint
- run: pnpm format-check
- run: pnpm test
- run: pnpm build
- if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `👋 e2e-test`
})
- name: test the default behavior
uses: ./
- if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `👋 e2e-test\n<!-- tail -->`
})
- if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `<!-- head -->\n👋 e2e-test`
})
- name: test with options
uses: ./
with:
ends-with: |
<!-- tail -->
starts-with: |
<!-- head -->
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable pnpm
- run: pnpm i
- run: pnpm format
- run: pnpm graphql-codegen
- uses: int128/update-generated-files-action@v2