diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e64a5f..4015453 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,6 +48,12 @@ jobs: - run: npm install + - name: Build + run: npm run build + + - name: Test + run: npx vitest run + - name: Validate selection env: RELEASE_ENGINE: ${{ inputs.release_engine }} @@ -102,12 +108,6 @@ jobs: - name: Update lockfile run: npm install - - name: Build - run: npm run build - - - name: Test - run: npx vitest run - - name: Publish engine if: inputs.release_engine == true run: npm publish --workspace packages/engine --access public --provenance diff --git a/packages/cli/tests/cli.test.ts b/packages/cli/tests/cli.test.ts index 6d2f9f6..542764b 100644 --- a/packages/cli/tests/cli.test.ts +++ b/packages/cli/tests/cli.test.ts @@ -41,9 +41,10 @@ describe('CLI command parsing', () => { }); it('shows version with --version', () => { + const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8')); const { stdout, exitCode } = runCli(['--version']); expect(exitCode).toBe(0); - expect(stdout.trim()).toBe('0.0.1'); + expect(stdout.trim()).toBe(pkg.version); }); it('shows run command help', () => {