Bump braces from 3.0.2 to 3.0.3 #179
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: Continuous Integration | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
prerequisites: | |
name: Prerequisites | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "18" | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: npm ci | |
run: npm ci | |
- name: npm audit | |
run: npm audit --production | |
- name: npm run build | |
run: npm run build | |
- name: npm run lint | |
run: npm run lint | |
- name: npm run docs | |
run: npm run docs | |
test: | |
name: Test on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "18" | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: test | |
run: | | |
npm ci | |
npm run test | |
- name: codecov.io | |
if: contains(runner.os, 'Linux') | |
uses: codecov/codecov-action@v1 | |
with: | |
file: coverage/lcov.info | |
verbose: true | |
github-pages: | |
name: Publish Docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "16" | |
- name: Build docs | |
run: | | |
npm ci | |
npm run docs | |
cd docs | |
tar czf ../pages.tgz . | |
- name: Upload docs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pages | |
path: pages.tgz | |
retention-days: 1 | |
- name: Change to pages branch | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- name: Download docs | |
uses: actions/download-artifact@v3 | |
with: | |
name: pages | |
- name: Add new docs | |
run: | | |
tar xzf pages.tgz | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
git add $(tar tzf pages.tgz) | |
git commit -m 'New doc pages from GitHub Workflow' | |
git push origin gh-pages |