Switch to pnpm (#36)
This commit is contained in:
+24
-22
@@ -1,30 +1,32 @@
|
||||
name: 'CI'
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
# we call `pnpm playwright install` instead
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
|
||||
|
||||
# cancel in-progress runs on new commits to same PR (gitub.event.number)
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
Lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: use node v16.x
|
||||
uses: actions/setup-node@v3
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
- name: yarn install
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: install --frozen-lockfile
|
||||
|
||||
- name: prettier lint
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: lint
|
||||
|
||||
- name: svelte check
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: check
|
||||
node-version: '16.x'
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm run lint
|
||||
- run: pnpm run check
|
||||
|
||||
@@ -7,26 +7,36 @@ on:
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
release:
|
||||
# prevents this action from running on forks
|
||||
if: github.repository == 'OllieJT/svelte-podcast'
|
||||
permissions:
|
||||
contents: write # to create release (changesets/action)
|
||||
pull-requests: write # to create pull request (changesets/action)
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: use node v16.x
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
||||
fetch-depth: 0
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: pnpm
|
||||
|
||||
- name: yarn install
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: install --frozen-lockfile
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Create Release Pull Request or Publish
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
publish: yarn run release
|
||||
# This expects you to have a script called release which does a build for your packages and calls changeset publish
|
||||
publish: pnpm release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
UPDATE_TEMPLATE_SSH_KEY: ${{ secrets.UPDATE_TEMPLATE_SSH_KEY }}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
name: 'CI'
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- todo
|
||||
|
||||
env:
|
||||
# we call `pnpm playwright install` instead
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
|
||||
|
||||
# cancel in-progress runs on new commits to same PR (gitub.event.number)
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
Lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.x'
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm run lint
|
||||
- run: pnpm run check
|
||||
Tests:
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- node-version: 16
|
||||
os: ubuntu-latest
|
||||
e2e-browser: 'chromium'
|
||||
- node-version: 18
|
||||
os: ubuntu-latest
|
||||
e2e-browser: 'chromium'
|
||||
env:
|
||||
KIT_E2E_BROWSER: ${{matrix.e2e-browser}}
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm playwright install ${{ matrix.e2e-browser }}
|
||||
- run: pnpm test
|
||||
- name: Archive test results
|
||||
if: failure()
|
||||
shell: bash
|
||||
run: find packages -type d -name test-results -not -empty | tar -czf test-results.tar.gz --files-from=-
|
||||
- name: Upload test results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
retention-days: 3
|
||||
name: test-failure-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }}
|
||||
path: test-results.tar.gz
|
||||
Cross-browser-test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- node-version: 16
|
||||
os: windows-2019 # slowness reported on newer versions https://github.com/actions/runner-images/issues/5166
|
||||
e2e-browser: 'chromium'
|
||||
mode: 'dev'
|
||||
- node-version: 16
|
||||
os: ubuntu-latest
|
||||
e2e-browser: 'firefox'
|
||||
mode: 'dev'
|
||||
- node-version: 16
|
||||
os: macOS-latest
|
||||
e2e-browser: 'webkit'
|
||||
mode: 'dev'
|
||||
- node-version: 16
|
||||
os: windows-2019 # slowness reported on newer versions https://github.com/actions/runner-images/issues/5166
|
||||
e2e-browser: 'chromium'
|
||||
mode: 'build'
|
||||
- node-version: 16
|
||||
os: ubuntu-latest
|
||||
e2e-browser: 'firefox'
|
||||
mode: 'build'
|
||||
- node-version: 16
|
||||
os: macOS-latest
|
||||
e2e-browser: 'webkit'
|
||||
mode: 'build'
|
||||
env:
|
||||
KIT_E2E_BROWSER: ${{matrix.e2e-browser}}
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm playwright install ${{ matrix.e2e-browser }}
|
||||
- run: pnpm test:cross-platform:${{ matrix.mode }}
|
||||
- name: Archive test results
|
||||
if: failure()
|
||||
shell: bash
|
||||
run: find packages -type d -name test-results -not -empty | tar -czf test-results-cross-platform-${{ matrix.mode }}.tar.gz --files-from=-
|
||||
- name: Upload test results
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
retention-days: 3
|
||||
name: test-failure-cross-platform-${{ matrix.mode }}-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }}
|
||||
path: test-results-cross-platform-${{ matrix.mode }}.tar.gz
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
||||
"source.fixAll.eslint": true,
|
||||
"source.organizeImports": true
|
||||
},
|
||||
"eslint.packageManager": "yarn",
|
||||
"eslint.packageManager": "pnpm",
|
||||
"files.exclude": {
|
||||
"**/.DS_Store": true,
|
||||
"**/*-lock.*": true,
|
||||
|
||||
+10
-6
@@ -13,16 +13,16 @@
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build && npm run package",
|
||||
"build": "vite build && pnpm package",
|
||||
"preview": "vite preview",
|
||||
"package": "svelte-kit sync && svelte-package && publint",
|
||||
"prepublishOnly": "npm run package",
|
||||
"test": "playwright test",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
||||
"format": "prettier --plugin-search-dir . --write .",
|
||||
"release": "yarn run build && changeset publish"
|
||||
"lint": "prettier --check --plugin-search-dir=. .",
|
||||
"format": "prettier --write --plugin-search-dir=. .",
|
||||
"release": "pnpm package && changeset publish",
|
||||
"ts": "tsc --pretty --noImplicitAny --noEmit"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
@@ -62,5 +62,9 @@
|
||||
},
|
||||
"svelte": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"type": "module"
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@7.28.0",
|
||||
"engines": {
|
||||
"pnpm": "^7.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+3355
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user