Bump word-wrap from 1.2.3 to 1.2.4 #568
This file contains 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: Build and Test | |
on: | |
push: | |
branches: | |
- 'main' # Only run if push is on main | |
pull_request: | |
branches: | |
- '*' # matches every branch | |
jobs: | |
windows-benchmark: | |
name: 🏁 Windows Benchmark | |
runs-on: windows-latest | |
timeout-minutes: 20 | |
steps: | |
- name: ⚙️ Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
- name: 🟢 Set node environment | |
uses: actions/setup-node@v3 | |
with: | |
cache: npm | |
node-version: 14.17.6 | |
- name: 📦 Cache node_modules and eslintcache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: | | |
**/node_modules | |
**/.eslintcache | |
key: ${{ runner.os }}-benchmark-${{ hashFiles('**/package-lock.json') }} | |
# A list of restore-keys is useful when you are restoring a cache | |
# from another cache because restore-keys can partially match cache keys. | |
restore-keys: | | |
${{ runner.os }}-benchmark- | |
${{ runner.os }}- | |
- name: ⬆️ Upgrade node-gyp | |
shell: powershell | |
run: | | |
npm install --global node-gyp@9 | |
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | |
- name: 📥 Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: 🏇 Run Benchmark | |
run: npm run benchmark | |
macos-benchmark: | |
name: 🍏 MacOS Benchmark | |
runs-on: macos-latest | |
timeout-minutes: 20 | |
steps: | |
- name: ⚙️ Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
- name: 🟢 Set node environment | |
uses: actions/setup-node@v3 | |
with: | |
cache: npm | |
node-version: 14.17.6 | |
- name: 📦 Cache node_modules and eslintcache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: | | |
**/node_modules | |
**/.eslintcache | |
key: ${{ runner.os }}-benchmark-${{ hashFiles('**/package-lock.json') }} | |
# A list of restore-keys is useful when you are restoring a cache | |
# from another cache because restore-keys can partially match cache keys. | |
restore-keys: | | |
${{ runner.os }}-benchmark | |
${{ runner.os }}- | |
- name: ⏩ Upgrade node-gyp | |
run: | | |
npm install --global node-gyp@9 | |
npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js | |
- name: 📥 Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: 🏇 Run Benchmark | |
run: npm run benchmark | |
linux: | |
name: 🐧 Linux Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: ⚙️ Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
- name: 🟢 Set node environment | |
uses: actions/setup-node@v3 | |
with: | |
cache: npm | |
node-version: 14.17.6 | |
- name: 📦 Cache node_modules and eslintcache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: | | |
**/node_modules | |
**/.eslintcache | |
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/.eslintcache') }} | |
# A list of restore-keys is useful when you are restoring a cache | |
# from another cache because restore-keys can partially match cache keys. | |
restore-keys: | | |
${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: ⏩ Upgrade node-gyp | |
run: | | |
npm install --global node-gyp@9 | |
npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js | |
- name: 📥 Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: 🧪 Run Linter | |
run: npm run lint | |
- name: 🧪 Run Tests | |
run: npm run test | |
- name: 📰 Coveralls GitHub Action | |
uses: coverallsapp/github-action@v1.1.2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: run-${{ matrix.test_number }} | |
parallel: true | |
- name: 👷 npm run tsc, build | |
run: | | |
npm run tsc | |
npm run build -- --target node14-linux-x64 --output=dist/snow | |
dist/snow --version | |
find dist -mindepth 1 ! -name snow -delete | |
mkdir -p dist/node_modules/drivelist/build/Release/ | |
cp node_modules/drivelist/build/Release/drivelist.node dist/node_modules/drivelist/build/Release/drivelist.node | |
cp -r resources dist | |
- name: 🗜️ 'Tar files' | |
run: tar -cvf snow.tar -C dist . | |
- name: 🚀 Publish Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: snow-cli-linux-x64 | |
path: snow.tar | |
macos: | |
name: 🍏 MacOS Build | |
runs-on: macos-latest | |
timeout-minutes: 20 | |
steps: | |
- name: ⚙️ Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
- name: 🟢 Set node environment | |
uses: actions/setup-node@v3 | |
with: | |
cache: npm | |
node-version: 14.17.6 | |
- name: 📦 Cache node_modules and eslintcache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: | | |
**/node_modules | |
**/.eslintcache | |
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/.eslintcache') }} | |
# A list of restore-keys is useful when you are restoring a cache | |
# from another cache because restore-keys can partially match cache keys. | |
restore-keys: | | |
${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: ⏩ Upgrade node-gyp | |
run: | | |
npm install --global node-gyp@9 | |
npm config set node_gyp $(npm prefix -g)/lib/node_modules/node-gyp/bin/node-gyp.js | |
- name: 📥 Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: 🧪 Run Tests | |
run: npm run test | |
- name: 📰 Coveralls GitHub Action | |
uses: coverallsapp/github-action@v1.1.2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: run-${{ matrix.test_number }} | |
parallel: true | |
- name: 👷 npm run tsc, build | |
run: | | |
npm run tsc | |
npm run build -- --target node14-macos-x64 --output=dist/snow | |
dist/snow --version | |
find dist -mindepth 1 ! -name snow -delete | |
mkdir -p dist/node_modules/drivelist/build/Release/ | |
cp node_modules/drivelist/build/Release/drivelist.node dist/node_modules/drivelist/build/Release/drivelist.node | |
cp -r resources dist | |
- name: 🗜️ 'Tar files' | |
run: tar -cvf snow.tar -C dist . | |
- name: 🚀 Publish Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: snow-cli-darwin-x64 | |
path: snow.tar | |
windows: | |
name: 🏁 Windows Build | |
runs-on: windows-latest | |
timeout-minutes: 20 | |
steps: | |
- name: ⚙️ Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
lfs: 'true' | |
- name: 🟢 Set node environment | |
uses: actions/setup-node@v3 | |
with: | |
cache: npm | |
node-version: 14.17.6 | |
- name: 📦 Cache node_modules and eslintcache | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: | | |
**/node_modules | |
**/.eslintcache | |
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/.eslintcache') }} | |
# A list of restore-keys is useful when you are restoring a cache | |
# from another cache because restore-keys can partially match cache keys. | |
restore-keys: | | |
${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: ⏩ Upgrade node-gyp | |
shell: powershell | |
run: | | |
npm install --global node-gyp@9 | |
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} | |
- name: 📥 Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: 🧪 Run Tests | |
run: npm run test | |
- name: 📰 Coveralls GitHub Action | |
uses: coverallsapp/github-action@v1.1.2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: run-${{ matrix.test_number }} | |
parallel: true | |
- name: 👷 npm run tsc, build | |
run: | | |
npm run tsc | |
npm run build -- --target node14-win-x64 --output=dist/snow.exe | |
dist/snow.exe --version | |
New-Item -Path dist/node_modules/drivelist/build/Release -ItemType Directory -Force | |
cp node_modules/drivelist/build/Release/drivelist.node dist/node_modules/drivelist/build/Release/drivelist.node | |
Copy-Item -Path resources -Destination dist -recurse -Force | |
- name: 🚀 Publish Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: snow-cli-win-x64 | |
path: | | |
dist/snow.exe | |
dist/resources | |
dist/node_modules/drivelist/build/Release/drivelist.node | |
analyze: | |
name: 🧪 Analyze | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'javascript' ] | |
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | |
# Learn more about CodeQL language support at https://git.io/codeql-language-support | |
steps: | |
- name: ⚙️ Checkout repository | |
uses: actions/checkout@v3 | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v1 | |
with: | |
languages: ${{ matrix.language }} | |
# If you wish to specify custom queries, you can do so here or in a config file. | |
# By default, queries listed here will override any specified in a config file. | |
# Prefix the list here with "+" to use these queries and those in the config file. | |
# queries: ./path/to/local/query, your-org/your-repo/queries@main | |
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | |
# If this step fails, then you should remove it and run the build manually (see below) | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v1 | |
# ℹ️ Command-line programs to run using the OS shell. | |
# 📚 https://git.io/JvXDl | |
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | |
# and modify them (or add more) to build your code if your project | |
# uses a compiled language | |
#- run: | | |
# make bootstrap | |
# make release | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v1 | |
finish: | |
needs: [macos, windows, linux, analyze] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |