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

Fix installation #37

Merged
merged 34 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3b63c9c
Fix paths for installation/graph test data generation
henriqueinonhe Nov 24, 2023
15dd065
1.0.2-0
henriqueinonhe Nov 24, 2023
733bdd3
Tweak bin.cjs
henriqueinonhe Nov 24, 2023
802acb8
1.0.2-1
henriqueinonhe Nov 24, 2023
1388a5f
Fix ts-node and Node20 related issues
henriqueinonhe Nov 24, 2023
02aa927
1.0.2-2
henriqueinonhe Nov 24, 2023
0a27dcd
Fix dynamic imports for Windows
henriqueinonhe Nov 24, 2023
0d3f1da
1.0.2-3
henriqueinonhe Nov 24, 2023
5ebee6c
Include tests with windows in CI
henriqueinonhe Nov 24, 2023
3b20dde
Improve scripts
henriqueinonhe Nov 26, 2023
09f9d6b
Convert setup and migrate to TS
henriqueinonhe Nov 26, 2023
924bc80
1.0.2-4
henriqueinonhe Nov 26, 2023
38c4433
Tweak package.json
henriqueinonhe Nov 26, 2023
179ad45
Fix setup
henriqueinonhe Nov 26, 2023
6dd6e85
1.0.2-5
henriqueinonhe Nov 26, 2023
c5c2911
Another try
henriqueinonhe Nov 26, 2023
5afc44e
1.0.2-6
henriqueinonhe Nov 26, 2023
0088fc0
Include necessary dependencies
henriqueinonhe Nov 26, 2023
c1a91e7
1.0.2-7
henriqueinonhe Nov 26, 2023
7254568
More dependencies
henriqueinonhe Nov 26, 2023
36f28cc
1.0.2-8
henriqueinonhe Nov 26, 2023
bbf45f1
Update package-lock
henriqueinonhe Nov 26, 2023
fc49245
1.0.2-9
henriqueinonhe Nov 26, 2023
4ffd79c
Rework ESM approach
henriqueinonhe Nov 26, 2023
cb5fa54
1.0.2-10
henriqueinonhe Nov 26, 2023
8214ad8
Fix
henriqueinonhe Nov 26, 2023
65b4046
1.0.2-11
henriqueinonhe Nov 26, 2023
597b6a6
Try removing unnecessary deps
henriqueinonhe Nov 26, 2023
0c8d77b
1.0.2-12
henriqueinonhe Nov 26, 2023
149ffe0
More
henriqueinonhe Nov 26, 2023
0b475fe
1.0.2-13
henriqueinonhe Nov 26, 2023
7a472f7
More
henriqueinonhe Nov 26, 2023
7756aa7
1.0.2-14
henriqueinonhe Nov 26, 2023
33c897f
Tweak CI
henriqueinonhe Nov 26, 2023
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
46 changes: 15 additions & 31 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ concurrency:
cancel-in-progress: true

jobs:
setup:
runs-on: ubuntu-22.04
get-node-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get Node Version
id: get-node-version
Expand All @@ -24,45 +24,29 @@ jobs:
# breaks the github action that consumes this data
run: echo node-version=$(cat package.json | jq ".engines.node" | sed 's/^"\(.*\)"$/\1/') >> $GITHUB_OUTPUT

- name: Get Node Modules Cache Key
id: get-node-modules-cache-key
run: echo cache-key=${{ hashFiles('yarn.lock') }}-test >> $GITHUB_OUTPUT

- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v3
with:
key: ${{ steps.get-node-modules-cache-key.outputs.cache-key }}
path: node_modules
lookup-only: true

- name: Install Dependencies
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
run: npm install

outputs:
node-version: ${{ steps.get-node-version.outputs.node-version }}
node-modules-cache-key: ${{ steps.get-node-modules-cache-key.outputs.cache-key }}

e2e:
needs:
- setup
runs-on: ubuntu-22.04
- get-node-version
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ needs.setup.outputs.node-version }}
node-version: ${{ needs.get-node-version.outputs.node-version }}
cache: "npm"

- name: Restore Node Modules
uses: actions/cache/restore@v3
with:
key: ${{ needs.setup.outputs.node-modules-cache-key }}
path: node_modules
fail-on-cache-miss: true
- name: Install Dependencies
run: npm ci

- name: Run E2E Tests
run: npm run e2e
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
node_modules

.data
.data

build

e2e
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 18.16.0
nodejs 20.10.0
246 changes: 0 additions & 246 deletions bin.cjs

This file was deleted.

27 changes: 27 additions & 0 deletions bin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env node

import { execSync } from "node:child_process";
import { argv } from "node:process";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";

const currentFilePath = fileURLToPath(new URL(import.meta.url));
const projectDirPath = resolve(currentFilePath, "..");

const main = async () => {
const option = argv[2];

if (option === "--migrate") {
execSync(`npm run --prefix ${projectDirPath} migrate ${resolve(".")}`, {
stdio: "inherit",
});
process.exit(0);
}

execSync(`npm run --prefix ${projectDirPath} setup ${resolve(".")}`, {
stdio: "inherit",
});
process.exit(0);
};

main();
Loading