Skip to content

Commit

Permalink
fix(ci): replace yarn with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybacon committed Mar 11, 2024
1 parent 2e24c98 commit 71a9f29
Showing 1 changed file with 33 additions and 19 deletions.
52 changes: 33 additions & 19 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,64 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up PNPM
uses: pnpm/action-setup@v3
with:
version: latest
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache: 'pnpm'
node-version-file: 'package.json'
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
# - name: Lint project
# run: pnpm lint
- name: Lint code
run: yarn lint:code
run: |
pnpm lint:code
pnpm lint:format
- name: Check typings
run: yarn lint:typings
run: pnpm lint:typings
- name: Lint Markdown
run: pnpm lint:wiki

tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up PNPM
uses: pnpm/action-setup@v3
with:
version: latest
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache: 'pnpm'
node-version-file: 'package.json'
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Run tests
run: yarn test:coverage --ci
run: pnpm test:coverage

preview:
name: Preview
needs: [lint, tests]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache: 'pnpm'
node-version-file: 'package.json'
- name: Set up Vercel
run: |
yarn global add vercel@latest
npm install --global vercel@latest
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
Expand All @@ -69,15 +83,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache: 'pnpm'
node-version-file: 'package.json'
- name: Set up Vercel
run: |
yarn global add vercel@latest
npm install --global vercel@latest
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
Expand Down

0 comments on commit 71a9f29

Please sign in to comment.