Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add some 3rd-party tests #2

Merged
merged 4 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ecosystem-ci-from-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ on:
- "-"
- eslint-plugin-svelte
- language-tools
- mdsvex
- prettier-plugin-svelte
- rollup-plugin-svelte
- skeleton
- svelte-eslint-parser
- svelte-loader
- svelte-preprocess
- sveltekit
Expand Down Expand Up @@ -99,8 +102,11 @@ jobs:
suite:
- eslint-plugin-svelte
- language-tools
- mdsvex
- prettier-plugin-svelte
- rollup-plugin-svelte
- skeleton
- svelte-eslint-parser
- svelte-loader
- svelte-preprocess
- sveltekit
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ecosystem-ci-selected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ on:
options:
- eslint-plugin-svelte
- language-tools
- mdsvex
- prettier-plugin-svelte
- rollup-plugin-svelte
- skeleton
- svelte-eslint-parser
- svelte-loader
- svelte-preprocess
- sveltekit
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ecosystem-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ jobs:
suite:
- eslint-plugin-svelte
- language-tools
- mdsvex
- prettier-plugin-svelte
- rollup-plugin-svelte
- skeleton
- svelte-eslint-parser
- svelte-loader
- svelte-preprocess
- sveltekit
Expand Down
15 changes: 15 additions & 0 deletions builds/language-tools.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { runInRepo } from '../utils'
import { RunOptions } from '../types'

export async function build(options: RunOptions) {
return runInRepo({
...options,
repo: 'sveltejs/language-tools',
branch: 'master',
build: 'build',
})
}

export const packages = {
'svelte-check': 'packages/svelte-check',
}
14 changes: 14 additions & 0 deletions builds/rollup-plugin-svelte.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { runInRepo } from '../utils'
import { RunOptions } from '../types'

export async function build(options: RunOptions) {
return runInRepo({
...options,
repo: 'sveltejs/rollup-plugin-svelte',
branch: 'master',
})
}

export const packages = {
'rollup-plugin-svelte': '.',
}
16 changes: 12 additions & 4 deletions ecosystem-ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const cli = cac()
cli
.command('[...suites]', 'build svelte and run selected suites')
.option('--verify', 'verify checkouts by running tests', { default: false })
.option('--repo <repo>', 'svelte repository to use', { default: 'sveltejs/svelte' })
.option('--repo <repo>', 'svelte repository to use', {
default: 'sveltejs/svelte',
})
.option('--branch <branch>', 'svelte branch to use', { default: 'version-4' })
.option('--tag <tag>', 'svelte tag to use')
.option('--commit <commit>', 'svelte commit sha to use')
Expand Down Expand Up @@ -52,7 +54,9 @@ cli
.option('--verify', 'verify svelte checkout by running tests', {
default: false,
})
.option('--repo <repo>', 'svelte repository to use', { default: 'sveltejs/svelte' })
.option('--repo <repo>', 'svelte repository to use', {
default: 'sveltejs/svelte',
})
.option('--branch <branch>', 'svelte branch to use', { default: 'main' })
.option('--tag <tag>', 'svelte tag to use')
.option('--commit <commit>', 'svelte commit sha to use')
Expand All @@ -69,7 +73,9 @@ cli
'verify checkout by running tests before using local svelte',
{ default: false },
)
.option('--repo <repo>', 'svelte repository to use', { default: 'sveltejs/svelte' })
.option('--repo <repo>', 'svelte repository to use', {
default: 'sveltejs/svelte',
})
.option('--release <version>', 'svelte release to use from npm registry')
.action(async (suites, options: CommandOptions) => {
const { root, sveltePath, workspace } = await setupEnvironment()
Expand All @@ -93,7 +99,9 @@ cli
)
.option('--good <ref>', 'last known good ref, e.g. a previous tag. REQUIRED!')
.option('--verify', 'verify checkouts by running tests', { default: false })
.option('--repo <repo>', 'svelte repository to use', { default: 'sveltejs/svelte' })
.option('--repo <repo>', 'svelte repository to use', {
default: 'sveltejs/svelte',
})
.option('--branch <branch>', 'svelte branch to use', { default: 'version-4' })
.option('--tag <tag>', 'svelte tag to use')
.option('--commit <commit>', 'svelte commit sha to use')
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"*": [
"prettier --write --ignore-unknown"
],
"**/*.js": [
"*.ts": [
"eslint"
]
},
"packageManager": "pnpm@8.4.0",
"packageManager": "pnpm@8.6.0",
"type": "module",
"engines": {
"node": ">=18",
Expand Down
6 changes: 5 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions tests/_carbon-components-svelte.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { runInRepo } from '../utils'
import { RunOptions } from '../types'

export async function test(options: RunOptions) {
await runInRepo({
...options,
repo: 'carbon-design-system/carbon-components-svelte',
branch: 'master',
build: 'build:lib',
test: 'test:types',
overrides: {
'rollup-plugin-svelte': true,
'svelte-check': 'latest', // should be true but building it is currently broken
},
})
}
2 changes: 1 addition & 1 deletion tests/_selftest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function test(options: RunOptions) {
)
}
pkg.scripts.selftestscript =
"[ -f ../../svelte/compiler.cjs ] || (echo 'svelte build failed' && exit 1)"
"[ -f ../../svelte/packages/svelte/compiler.cjs ] || (echo 'svelte build failed' && exit 1)"
await fs.promises.writeFile(
pkgFile,
JSON.stringify(pkg, null, 2),
Expand Down
12 changes: 12 additions & 0 deletions tests/mdsvex.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { runInRepo } from '../utils'
import { RunOptions } from '../types'

export async function test(options: RunOptions) {
await runInRepo({
...options,
repo: 'pngwn/MDsveX',
branch: 'master',
build: 'pnpm -r build',
test: 'pnpm test',
})
}
16 changes: 16 additions & 0 deletions tests/skeleton.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { runInRepo } from '../utils'
import { RunOptions } from '../types'

export async function test(options: RunOptions) {
await runInRepo({
...options,
repo: 'skeletonlabs/skeleton',
branch: 'dev',
test: ['test', 'check'].map(
(script) => `pnpm --dir packages/skeleton ${script}`,
),
overrides: {
'svelte-check': 'latest', // needed for svelte-4, should be `true` but language-tools build still fails
},
})
}
12 changes: 12 additions & 0 deletions tests/svelte-eslint-parser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { runInRepo } from '../utils'
import { RunOptions } from '../types'

export async function test(options: RunOptions) {
await runInRepo({
...options,
repo: 'sveltejs/svelte-eslint-parser',
branch: 'main',
build: 'build',
test: 'test',
})
}