Created
August 25, 2021 20:33
-
-
Save ktalebian/c78ce71d9d073dba54ded4c7fca12cda to your computer and use it in GitHub Desktop.
pr-validator.yml
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: PR Validator | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
validator: | |
runs-on: ubuntu-18.04 | |
strategy: | |
matrix: | |
node-version: [12.x, 14.x, 16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
# Install the node version | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# copy the appConfig and setup anything else required for Flex Plugin to work | |
- name: Setup repository | |
run: cp public/appConfig.example.js public/appConfig.js | |
# Run npm install to install dependencies | |
- name: Installing dependencies | |
run: npm ci && cd functions && npm ci && cd .. | |
# Run the linter | |
- name: Run Linter | |
run: npm run lint | |
# Run the test | |
- name: Run Test | |
run: npm run test | |
# Run any other checks you may want to do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment