Bump mocha from 10.4.0 to 11.0.1 #321
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: CI | |
on: [pull_request, push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
- name: Install dependencies | |
run: npm ci --skip-proj-wasm --skip-proj-native | |
- name: Lint | |
run: npm run lint | |
swig: | |
name: Generate the SWIG wrappers | |
uses: ./.github/workflows/swig.yml | |
build-native: | |
name: Build native ${{ matrix.platform && '' || '' }} | |
needs: swig | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
enable_tiff: [true, false] | |
uses: | |
./.github/workflows/build.yml | |
with: | |
platform: ${{ matrix.platform }} | |
native: true | |
wasm: false | |
id: native-${{ matrix.platform }}-${{ matrix.enable_tiff && 'tiff' || 'no_tiff'}} | |
enable_tiff: ${{ matrix.enable_tiff }} | |
build-wasm: | |
name: Build WASM ${{ matrix.enable_tiff && '' || '' }} | |
needs: swig | |
strategy: | |
fail-fast: false | |
matrix: | |
inline_projdb: [true, false] | |
enable_tiff: [true, false] | |
uses: | |
./.github/workflows/build.yml | |
with: | |
platform: ubuntu-latest | |
native: false | |
wasm: true | |
enable_tiff: ${{ matrix.enable_tiff }} | |
inline_projdb: ${{ matrix.inline_projdb }} | |
id: wasm-${{ matrix.inline_projdb && 'inlined' || 'external' }}-${{ matrix.enable_tiff && 'tiff' || 'no_tiff'}} | |
build-asan: | |
name: Build ASAN instrumented version | |
needs: swig | |
uses: | |
./.github/workflows/build.yml | |
with: | |
platform: ubuntu-latest | |
native: false | |
wasm: false | |
asan: true | |
id: native-asan | |
build-codecov: | |
name: Build code coverage instrumented version | |
needs: swig | |
uses: | |
./.github/workflows/build.yml | |
with: | |
platform: ubuntu-latest | |
native: false | |
wasm: false | |
codecov: true | |
id: native-codecov | |
test: | |
runs-on: ${{ matrix.platform }} | |
name: Test ${{ matrix.platform }}${{ matrix.enable_tiff && ' ' || ' w/o libtiff' }}${{ matrix.inline_projdb && ' ' || ' w/o proj.db' }} | |
needs: [ build-wasm, build-native ] | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
inline_projdb: [true, false] | |
enable_tiff: [true, false] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Download the SWIG-generated wrappers | |
uses: actions/download-artifact@v4 | |
with: | |
name: swig-generated | |
path: swig | |
- name: Download the native artifact ${{ matrix.platform }} | |
uses: actions/download-artifact@v4 | |
with: | |
name: native-${{ matrix.platform }}-${{ matrix.enable_tiff && 'tiff' || 'no_tiff'}} | |
path: lib/binding | |
- name: Download the WASM artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: wasm-${{ matrix.inline_projdb && 'inlined' || 'external' }}-${{ matrix.enable_tiff && 'tiff' || 'no_tiff'}} | |
path: lib/binding | |
- name: Install dependencies | |
run: npm install --skip-proj-wasm --skip-proj-native | |
- name: Run the Node.js tests | |
run: npm run test:nodejs | |
- name: Run the browser tests (macOS / Windows) | |
if: runner.os != 'Linux' | |
run: npm run test:browser | |
- name: Run the browser tests (Linux) | |
if: runner.os == 'Linux' | |
run: xvfb-run npm run test:browser | |
- name: Test building the webpack project | |
run: npm run build:webpack | |
asan: | |
runs-on: ubuntu-latest | |
name: Run asan | |
needs: [ build-asan, build-wasm ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Download the SWIG-generated wrappers | |
uses: actions/download-artifact@v4 | |
with: | |
name: swig-generated | |
path: swig | |
- name: Download the WASM artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: wasm-inlined-tiff | |
path: lib/binding | |
- name: Download the ASAN instrumented artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: native-asan | |
path: lib/binding | |
- name: Install dependencies | |
run: | | |
npm install --skip-proj-wasm --skip-proj-native | |
npx xpm install | |
- name: Run the Node.js tests | |
run: npm run test:nodejs | |
env: | |
LD_PRELOAD: /usr/lib/x86_64-linux-gnu/libasan.so.6 | |
LSAN_OPTIONS: suppressions=${{ github.workspace }}/test/napi-leaks-suppression.txt | |
codecov: | |
runs-on: ubuntu-latest | |
name: Run code coverage | |
needs: [ build-codecov, build-wasm ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Download the SWIG-generated wrappers | |
uses: actions/download-artifact@v4 | |
with: | |
name: swig-generated | |
path: swig | |
- name: Download the WASM artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: wasm-inlined-tiff | |
path: lib/binding | |
- name: Download the code coverage artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: native-codecov | |
path: lib/binding | |
- name: Install dependencies | |
run: | | |
npm install --skip-proj-wasm --skip-proj-native | |
npx xpm install | |
- name: Run the Node.js tests | |
run: npx c8 npm run test:nodejs | |
- name: Collect code coverage | |
run: | | |
npm run gcov | |
npm run lcov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: coverage | |
slug: mmomtchev/proj.js |