Skip to content

Commit

Permalink
Merge pull request #183 from julianmesa-gitkraken/update-CI-and-packages
Browse files Browse the repository at this point in the history
Update ci and packages
  • Loading branch information
ianhattendorf authored Jul 12, 2024
2 parents 13a84d9 + 30bdf10 commit 718bfb2
Show file tree
Hide file tree
Showing 7 changed files with 683 additions and 1,078 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ jobs:
name: "Linux Tests"
strategy:
matrix:
container: ["centos:7", "ubuntu:18.04"]
node: [12, 14]
container: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
node: [18, 20, 22]
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
Expand All @@ -47,13 +49,13 @@ jobs:
name: "MacOS Tests"
strategy:
matrix:
node: [12, 14]
node: [18, 20, 22]
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
Expand All @@ -67,20 +69,18 @@ jobs:
name: "Windows Tests"
strategy:
matrix:
node: [12, 14]
node: [18, 20, 22]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true

- run: |
npm install --global yarn
npm install --global [email protected]
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
yarn
yarn test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ lib
# extraneous operating system items
.DS_Store

# Visual Studio Code
.vscode/

# IntelliJ WebStorm
.idea/

# ignore test folders
nsfw-stress-test
mockfs
Expand Down
6 changes: 3 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"include_dirs": [
"includes",
"<!@(node -p \"require('node-addon-api').include\")"
"<!(node -p \"require('node-addon-api').include_dir\")"
],
"cflags!": ["-fno-exceptions"],
"cflags_cc!": ["-fno-exceptions"],
Expand All @@ -29,10 +29,10 @@
],
"msvs_settings": {
"VCCLCompilerTool": {
"DisableSpecificWarnings": [ "4506", "4538", "4793" ]
"DisableSpecificWarnings": [ ]
},
"VCLinkerTool": {
"AdditionalOptions": [ "/ignore:4248" ]
"AdditionalOptions": [ ]
}
}
}],
Expand Down
6 changes: 3 additions & 3 deletions includes/win32/Watcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ class Watcher
void resizeBuffers(std::size_t size);

std::string getUTF8Directory(std::wstring path) ;
bool Watcher::isExcluded(const std::wstring &fileName);
bool isExcluded(const std::wstring &fileName);

std::wstring Watcher::getWatchedPathFromHandle();
void Watcher::checkWatchedPath();
std::wstring getWatchedPathFromHandle();
void checkWatchedPath();

std::atomic<bool> mRunning;
SingleshotSemaphore mHasStartedSemaphore;
Expand Down
4 changes: 2 additions & 2 deletions js/scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ const cp = require('child_process');
if (process.platform !== 'win32' && process.platform !== 'darwin') {
// When ran as a npm script we can invoke npm bins such as node-gyp and mocha directly
exec('node-gyp rebuild', { env: { ...process.env, NSFW_TEST_SLOW: 1 } });
exec('mocha --exit --expose-gc js/spec/index-slow-spec.js');
exec('mocha --exit --v8-expose-gc js/spec/index-slow-spec.js');
exec('node-gyp rebuild');
}
exec('mocha --exit --expose-gc js/spec/index-spec.js');
exec('mocha --exit --v8-expose-gc js/spec/index-spec.js');

/**
* @param {string} commandline ...
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
],
"homepage": "https://github.com/axosoft/node-simple-file-watcher",
"dependencies": {
"node-addon-api": "^5.0.0"
"node-addon-api": "*"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint": "8.x",
"executive": "^1.6.3",
"fs-extra": "^7.0.0",
"mocha": "^7.1.1"
"fs-extra": "^11.2.0",
"globals": "^15.8.0",
"mocha": "^10.6.0"
},
"keywords": [
"FileWatcher",
Expand Down
Loading

0 comments on commit 718bfb2

Please sign in to comment.