Skip to content

quic-transport: test cases for Node.js #906

quic-transport: test cases for Node.js

quic-transport: test cases for Node.js #906

Workflow file for this run

name: build
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
build:
strategy:
fail-fast: false
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.local/share/pnpm/store
key: build-${{ hashFiles('**/package.json') }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- run: |
npm install -g corepack
corepack pnpm install
env:
PUPPETEER_SKIP_DOWNLOAD: true
- run: corepack pnpm build
- run: corepack pnpm lint
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: build-lib
path: pkg/*/lib/
retention-days: 1
timeout-minutes: 30
unittest:
strategy:
matrix:
include:
- node: 26
test: test
- node: 24
test: cover
fail-fast: false
name: unittest (${{ matrix.node }})
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.local/share/pnpm/store
key: unittest-${{ matrix.node }}-${{ hashFiles('**/package.json') }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ matrix.node }}
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Install dependencies
run: |
echo "deb [arch=amd64 trusted=yes] https://nfd-nightly-apt.ndn.today/ubuntu noble main" \
| sudo tee /etc/apt/sources.list.d/nfd-nightly.list
sudo apt-get update
sudo apt-get install --no-install-recommends ndnsec
pip install git+https://github.com/UCLA-IRL/ndn-python-repo@991ed9de02add3c1aea9994da573da9ae3ce7c67
- run: |
npm install -g corepack
corepack pnpm install
env:
PUPPETEER_SKIP_DOWNLOAD: true
- run: corepack pnpm ${{ matrix.test }}
- uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.test == 'cover' }}
continue-on-error: true
timeout-minutes: 30
integ:
strategy:
fail-fast: false
runs-on: ubuntu-24.04
steps:
- name: Disable Ubuntu AppArmor Namespace Restrictions
run: |
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0 || true
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.local/share/pnpm/store
~/.cache/puppeteer
key: integ-${{ hashFiles('**/package.json') }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- name: Install dependencies
run: |
echo "deb [arch=amd64 trusted=yes] https://nfd-nightly-apt.ndn.today/ubuntu noble main" \
| sudo tee /etc/apt/sources.list.d/nfd-nightly.list
sudo apt-get update
sudo apt-get install --no-install-recommends clang-format-19 libndn-cxx-dev libpsync-dev nfd
sudo cp /etc/ndn/nfd.conf.sample /etc/ndn/nfd.conf
sudo systemctl restart nfd
- run: |
npm install -g corepack
corepack pnpm install
- run: corepack pnpm build
- name: Check dependencies and devDependencies
run: node mk/check-dep.mjs
- run: corepack pnpm literate lint
- run: corepack pnpm literate
- run: cd integ/browser-tests && corepack pnpm test
- run: cd integ/cxx-tests && corepack pnpm test
- name: Check C++ and bash code style
run: |
corepack pnpm clang-format
corepack pnpm shfmt
git diff --exit-code
timeout-minutes: 30
publish:
needs: [build, unittest, integ]
if: ${{ github.repository == 'yoursunny/NDNts' && github.event_name == 'push' }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.local/share/pnpm/store
key: publish-${{ hashFiles('**/package.json') }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
- run: |
npm install -g corepack
corepack pnpm install
- run: corepack pnpm install
env:
PUPPETEER_SKIP_DOWNLOAD: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-lib
path: pkg/
- run: bash mk/publish-nightly.sh
env:
GTAGID: G-YSW3MP43Z4
- run: |
corepack pnpm typedoc
[[ -f docs/typedoc/modules/_ndn_packet.html ]]
env:
GTAGID: G-YSW3MP43Z4
- uses: crazy-max/ghaction-github-pages@1d6ee9b181a81033a16bd707a1401afa978daab4 # v5.0.0
with:
repo: yoursunny/NDNts-nightly
build_dir: ./mk/nightly-output/
commit_message: ${{ github.sha }} ${{ github.run_id }}
fqdn: ndnts-nightly.ndn.today
env:
GH_PAT: ${{ secrets.NIGHTLY_ACCESS_TOKEN }}
- uses: nwtgck/actions-netlify@d22a32a27c918fe470bbc562e984f80ec48c2668 # v4.0.0
with:
publish-dir: ./docs/
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: ${{ github.sha }} ${{ github.run_id }}
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: false
enable-github-deployment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: 8987d2bb-7638-4d6b-adff-806fe3b7309a
timeout-minutes: 30
# to update actions: corepack pnpx actions-up