Add Gravity PDF Metabox to Gravity Flow Inbox #2318
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: JavaScript Tests | |
on: [push, pull_request] | |
jobs: | |
# Runs the QUnit tests for WordPress. | |
# | |
# Performs the following steps: | |
# - Cancels all previous workflow runs for pull requests that have not completed. | |
# - Checks out the repository. | |
# - Logs debug information about the runner container. | |
# - Installs NodeJS 12 | |
# - Sets up caching for NPM. | |
# - Logs updated debug information. | |
# _ Installs NPM dependencies using install-changed to hash the `package.json` file. | |
# - Run the WordPress QUnit tests. | |
test-js: | |
name: JavaScript Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node JS | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Log debug information | |
run: | | |
node --version | |
yarn --version | |
- name: Install Dependencies | |
if: steps.cache-nodemodules.outputs.cache-hit != 'true' | |
run: yarn install | |
- name: Run Jest tests | |
run: yarn test:js:coverage | |
- name: Code Coverage | |
run: | | |
bash <(curl -s https://codecov.io/bash); |