Skip to content
Closed
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
16 changes: 3 additions & 13 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,12 @@ jobs:
node-version: lts/jod
- run: npm ci
- run: npm run lint
simple-tests:
test:
strategy:
matrix:
runner: [ubuntu-latest, windows-latest]
name: Run simple tests (${{ matrix.runner }})
runner: [ubuntu-latest, windows-latest, macos-latest]
name: Test (${{ matrix.runner }})
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/jod
- run: npm ci
- run: npx nx run-many -t test --exclude @react-native-node-api/node-addon-examples
macos-tests:
name: Run tests which requires MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
1 change: 1 addition & 0 deletions packages/node-addon-examples/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@react-native-node-api/node-addon-examples",
"type": "commonjs",
"private": true,
"homepage": "https://github.com/callstackincubator/react-native-node-api",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions packages/node-addon-examples/scripts/cmake-projects.mts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { readdirSync, statSync } from "node:fs";
import { join } from "node:path";
import path from "node:path";

export const EXAMPLES_DIR = new URL("../examples", import.meta.url).pathname;
export const EXAMPLES_DIR = path.resolve(import.meta.dirname, "../examples");

export function findCMakeProjects(dir = EXAMPLES_DIR): string[] {
let results: string[] = [];
const files = readdirSync(dir);

for (const file of files) {
const fullPath = join(dir, file);
const fullPath = path.join(dir, file);
if (statSync(fullPath).isDirectory()) {
results = results.concat(findCMakeProjects(fullPath));
} else if (file === "CMakeLists.txt") {
Expand Down
Loading