Skip to content

Update dependency commander to v12 #67

Update dependency commander to v12

Update dependency commander to v12 #67

Workflow file for this run

name: test
on:
- push
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-and-unit-testing:
name: lint and unit testing
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
node-version: lts/*
- run: npm ci
- run: npm run lint
- run: npm test
cli-command-testing:
name: CLI command testing
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
node-version: lts/*
- run: npm ci
- run: ./bin.js --help
- run: ./bin.js -i 50 -c 'sleep 1 && npx http-server -p 8989 .' http://127.0.0.1:8989
- run: lsof -i:8989 | awk '$2 ~ /^[0-9]+$/ { print $2 }' | xargs kill -s TERM
- id: http-server
run: |
nohup npx http-server -p 8383 &
echo "pid=$!" >> "$GITHUB_OUTPUT"
- run: ./bin.js -i 50 http://127.0.0.1:8383 && kill -s TERM '${{ steps.http-server.outputs.pid }}'