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

ci: replace basic registry e2e tests by e2e-launcher.js #137

Merged
merged 1 commit into from
Nov 22, 2024
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
17 changes: 10 additions & 7 deletions .github/workflows/reusable-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ jobs:
with:
node-version-file: ${{ inputs.node-version-file }}
node-version: ${{ inputs.node-version }}
cache: yarn
cache-dependency-path: yarn.lock

# We install project dependencies to be able to run e2e-launcher.js
- run: yarn install --frozen-lockfile

# But we do install log4brains from the registry
- run: npm install -g ${{ inputs.npm-package-fullname }}

# TODO: test the preview and add some assertions :-) For now we just check the exit codes. Or manage to run e2e-tests/e2e-launcher.js from here
- name: Tests
run: |
log4brains --version
log4brains init --defaults
log4brains adr list
log4brains build
# We don't use "yarn e2e" directly so we are sure that we are using the global version of log4brains
- name: E2E Tests on the registry version
run: node e2e-launcher.js
working-directory: e2e-tests
2 changes: 2 additions & 0 deletions e2e-tests/e2e-launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ async function run(file, arguments, cwd) {

(async () => {
await usingTempDir(async (cwd) => {
await run("log4brains", ["--version"], cwd);

await run("log4brains", ["init", "--defaults"], cwd);

await run("log4brains", ["adr", "new", "--quiet", '"E2E test ADR"'], cwd);
Expand Down
Loading