ci: separate tests-unit, esm scripts (#5607)
* ci: script esm updates * ci: separate out unit tests
This commit is contained in:
36
.github/workflows/main.yml
vendored
36
.github/workflows/main.yml
vendored
@@ -117,7 +117,35 @@ jobs:
|
||||
- run: pnpm install
|
||||
- run: pnpm run build:plugins
|
||||
|
||||
tests:
|
||||
tests-unit:
|
||||
runs-on: ubuntu-latest
|
||||
needs: core-build
|
||||
if: false # Disable until tests are updated for 3.0
|
||||
|
||||
steps:
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v3
|
||||
with:
|
||||
version: 8
|
||||
run_install: false
|
||||
|
||||
- name: Restore build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ github.sha }}-${{ github.run_number }}
|
||||
|
||||
- name: Unit Tests
|
||||
run: pnpm test:unit
|
||||
env:
|
||||
NODE_OPTIONS: --max-old-space-size=8096
|
||||
|
||||
tests-int:
|
||||
runs-on: ubuntu-latest
|
||||
needs: core-build
|
||||
strategy:
|
||||
@@ -201,12 +229,6 @@ jobs:
|
||||
echo "POSTGRES_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres" >> $GITHUB_ENV
|
||||
if: matrix.database == 'supabase'
|
||||
|
||||
- name: Unit Tests
|
||||
if: false # Disable until tests are updated for 3.0
|
||||
run: pnpm test:unit
|
||||
env:
|
||||
NODE_OPTIONS: --max-old-space-size=8096
|
||||
|
||||
- name: Integration Tests
|
||||
run: pnpm test:int
|
||||
env:
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
"prepare": "husky install",
|
||||
"pretest": "pnpm build",
|
||||
"reinstall": "pnpm clean:all && pnpm install",
|
||||
"script:list-packages": "tsx ./scripts/list-packages.ts",
|
||||
"script:pack": "tsx scripts/pack-all-to-dest.ts",
|
||||
"release:alpha": "tsx ./scripts/release.ts --bump prerelease --tag alpha",
|
||||
"release:beta": "tsx ./scripts/release.ts --bump prerelease --tag beta",
|
||||
@@ -146,7 +145,7 @@
|
||||
"semver": "^7.5.4",
|
||||
"sharp": "0.32.6",
|
||||
"shelljs": "0.8.5",
|
||||
"simple-git": "^3.20.0",
|
||||
"simple-git": "^3.24.0",
|
||||
"slash": "3.0.0",
|
||||
"slate": "0.91.4",
|
||||
"swc-plugin-transform-remove-imports": "^1.12.1",
|
||||
|
||||
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -257,8 +257,8 @@ importers:
|
||||
specifier: 0.8.5
|
||||
version: 0.8.5
|
||||
simple-git:
|
||||
specifier: ^3.20.0
|
||||
version: 3.22.0
|
||||
specifier: ^3.24.0
|
||||
version: 3.24.0
|
||||
slash:
|
||||
specifier: 3.0.0
|
||||
version: 3.0.0
|
||||
@@ -15908,8 +15908,8 @@ packages:
|
||||
simple-concat: 1.0.1
|
||||
dev: true
|
||||
|
||||
/simple-git@3.22.0:
|
||||
resolution: {integrity: sha512-6JujwSs0ac82jkGjMHiCnTifvf1crOiY/+tfs/Pqih6iow7VrpNKRRNdWm6RtaXpvvv/JGNYhlUtLhGFqHF+Yw==}
|
||||
/simple-git@3.24.0:
|
||||
resolution: {integrity: sha512-QqAKee9Twv+3k8IFOFfPB2hnk6as6Y6ACUpwCtQvRYBAes23Wv3SZlHVobAzqcE8gfsisCvPw3HGW3HYM+VYYw==}
|
||||
dependencies:
|
||||
'@kwsites/file-exists': 1.1.1
|
||||
'@kwsites/promise-deferred': 1.1.1
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import { getPackageDetails, showPackageDetails } from './lib/getPackageDetails'
|
||||
|
||||
async function main() {
|
||||
const packageDetails = await getPackageDetails()
|
||||
showPackageDetails(packageDetails)
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
})
|
||||
@@ -36,9 +36,9 @@ const packageWhitelist = [
|
||||
// 'plugin-stripe',
|
||||
]
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
const cwd = path.resolve(__dirname, '..')
|
||||
const filename = fileURLToPath(import.meta.url)
|
||||
const dirname = path.dirname(filename)
|
||||
const cwd = path.resolve(dirname, '..')
|
||||
|
||||
const git = simpleGit(cwd)
|
||||
|
||||
@@ -180,7 +180,7 @@ async function main() {
|
||||
|
||||
// Set version in root package.json
|
||||
header(`${logPrefix}📦 Updating root package.json...`)
|
||||
const rootPackageJsonPath = path.resolve(__dirname, '../package.json')
|
||||
const rootPackageJsonPath = path.resolve(dirname, '../package.json')
|
||||
const rootPackageJson = await fse.readJSON(rootPackageJsonPath)
|
||||
rootPackageJson.version = nextReleaseVersion
|
||||
if (!dryRun) {
|
||||
|
||||
@@ -11,7 +11,7 @@ import { default as getConventionalPreset } from 'conventional-changelog-convent
|
||||
import { once } from 'events'
|
||||
import fse from 'fs-extra'
|
||||
import minimist from 'minimist'
|
||||
import simpleGit from 'simple-git'
|
||||
import { simpleGit } from 'simple-git'
|
||||
import tempfile from 'tempfile'
|
||||
|
||||
const { createReadStream, createWriteStream } = fse
|
||||
|
||||
Reference in New Issue
Block a user