Add a Read the Docs configuration file. #41
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: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# There is no "allow failures" option for GitHub Actions, but | |
# we test on the latest LTS release anyway just so we can | |
# notice if it breaks. | |
# | |
# | |
# Version 12.2.0 added `Module#createRequire(...)`, which | |
# ESLint depends upon. (TODO: Consider using ESLint someday.) | |
# | |
# Versions 14.18.1 and 16.13.0 are the two most recent LTS | |
# versions at the time of writing, and we intend to support | |
# them both. Some Webpack users may be using 14.18.1 because | |
# of (questionable?) advice to downgrade past | |
# Node.js version 16 to work around a hashing algorithm | |
# deprecation: | |
# | |
# https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported | |
# | |
# Version 17 is the latest major version as of this writing. | |
# We intend to support it, but it has no LTS releases yet, and | |
# we may not reasonably be able to support it if it introduces | |
# major regressions. | |
# | |
node-version: ["12.2.0", "14.18.1", "16.13.0", "17", "lts/*"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
cache: npm | |
node-version: ${{ matrix.node-version }} | |
- name: Check the Node.js version | |
run: node --version | |
- name: Install npm dependencies | |
run: npm install | |
- name: Clean | |
run: npm run clean | |
# PORT TODO: Consider adding a linting step. | |
- name: Build | |
run: npm run build | |
- name: Run unit tests | |
run: npm test |