fix github actions #1890
Workflow file for this run
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: Ensure PR | |
on: | |
pull_request: | |
jobs: | |
unitTest: | |
name: Unit Test | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- run: yarn --frozen-lockfile | |
- run: yarn jest | |
lint: | |
name: Lint | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- run: yarn --frozen-lockfile | |
- run: yarn lint:js | |
- run: yarn lint:markdown | |
proseLint: | |
name: Proselint | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Vale | |
uses: errata-ai/vale-action@v1.4.2 | |
with: | |
files: src/content | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
lintLinks: | |
name: Check Links | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- run: yarn | |
- name: Enable webpack persistent caching | |
uses: actions/cache@v3 | |
id: build-webpack-persistent-cache | |
with: | |
path: node_modules/.cache | |
key: build-${{ hashFiles('**/webpack.*.mjs') }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: |- | |
build-${{ hashFiles('**/webpack.*.mjs') }}-${{ hashFiles('**/yarn.lock') }} | |
build-${{ hashFiles('**/webpack.*.mjs') }}- | |
- name: Build site | |
run: yarn build | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- run: yarn lint:links | |
e2e: | |
name: End to End Testing | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Enable webpack persistent caching | |
uses: actions/cache@v3 | |
id: build-webpack-persistent-cache | |
with: | |
path: node_modules/.cache | |
key: build-${{ hashFiles('**/webpack.*.mjs') }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: |- | |
build-${{ hashFiles('**/webpack.*.mjs') }}-${{ hashFiles('**/yarn.lock') }} | |
build-${{ hashFiles('**/webpack.*.mjs') }}- | |
- name: Cypress run | |
uses: cypress-io/github-action@v4 | |
with: | |
browser: chrome | |
config-file: cypress.config.js | |
build: yarn build | |
start: yarn serve-dist | |
command: yarn cypress:run |