refactor(cli): read version from package metadata #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CLI test | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "bin/**" | |
| - "src/**" | |
| - "tests/**" | |
| - "templates/**" | |
| - "package.json" | |
| - ".github/workflows/cli-test.yml" | |
| pull_request: | |
| paths: | |
| - "bin/**" | |
| - "src/**" | |
| - "tests/**" | |
| - "templates/**" | |
| - "package.json" | |
| - ".github/workflows/cli-test.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| cli: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: "20" | |
| - run: npm test | |
| - run: node ./bin/beforecode.js help | |
| - run: node ./bin/beforecode.js list | |
| - run: node ./bin/beforecode.js init --type saas --docs tmp-docs | |
| - run: node ./bin/beforecode.js check --type saas --docs tmp-docs | |
| - run: node ./bin/beforecode.js score --type saas --docs tmp-docs | |
| - run: node ./bin/beforecode.js handoff --name "CI Demo" --docs tmp-docs |