[Snyk] Security upgrade @mdn/yari from 0.4.853 to 2.63.0 #256
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: Preview | |
on: | |
pull_request: | |
paths: | |
- package.json | |
- yarn.lock | |
- .github/workflows/preview.yml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2.5.0 | |
with: | |
node-version: "12" | |
- name: Cache node_modules | |
uses: actions/cache@v2.1.7 | |
id: cached-node_modules | |
with: | |
path: | | |
node_modules | |
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ hashFiles('.github/workflows/preview.yml') }} | |
- name: Install all yarn packages | |
if: steps.cached-node_modules.outputs.cache-hit != 'true' | |
run: | | |
yarn --frozen-lockfile | |
- name: Start the Yari server | |
run: | | |
yarn start & | |
- name: Wait for server | |
run: | | |
curl --retry-connrefused --retry 5 http://localhost:5000 | |
# TODO Do something with puppeteer here maybe | |
curl --fail http://localhost:5000/en-US/docs/MDN/Kitchensink > /dev/null | |
curl --fail http://localhost:5000/en-US/docs/MDN/Kitchensink/index.json > /dev/null |