.github/workflows: Use actions/reusable-workflows for CI validation (#282)

Reference: https://github.com/actions/reusable-workflows
Reference: a8533f184b/.github/workflows/basic-validation.yml
Reference: a8533f184b/.github/workflows/check-dist.yml

Simplify the project's CI by using the recently developed actions/reusable-workflows for testing and dist/ compilation checking.

Recompiled `dist/` via `npm run build`
This commit is contained in:
Brian Flad 2022-12-22 07:51:35 -08:00 committed by GitHub
parent 8feba2b913
commit 97112244d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 735 additions and 755 deletions

View file

@ -7,30 +7,9 @@ on:
pull_request:
jobs:
check-dist:
name: Check dist/ directory
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@a8533f184b279cfc1b2dd6a96ed2f097ccf81189
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install
run: npm clean-install
- name: Verify
if: runner.os == 'Linux'
run: |
npm run build
# Fail if "npm run build" generated new changes in dist
git update-index --refresh dist/* && git diff-index --quiet HEAD dist
- name: Test
run: npm test
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@a8533f184b279cfc1b2dd6a96ed2f097ccf81189

1464
dist/index1.js vendored

File diff suppressed because it is too large Load diff

View file

@ -14,7 +14,8 @@
"lint": "cd wrapper && npm run lint && cd .. && semistandard --env jest --fix",
"build": "cd wrapper && npm run build && cd .. && ncc build index.js --out dist",
"postinstall": "cd wrapper && npm install",
"prepare": "husky install"
"prepare": "husky install",
"format-check": "echo \"unimplemented for actions/reusable-workflows basic-validation\""
},
"keywords": [],
"author": "",