Skip to content

ASUB-7972 Radio button #849

ASUB-7972 Radio button

ASUB-7972 Radio button #849

name: Pull Request Test and Lint
on:
pull_request:
# synchronize commit(s) pushed to the pull request
types: [synchronize, opened]
jobs:
ensure_minimum_test_coverage_and_lint_all_files:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
# 0 indicates all history for all branches and tags
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
registry-url: "https://npm.pkg.github.com"
- name: Cache Node files
uses: actions/cache@v3
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Clean install (CI) dependencies if lockfile (above) changed
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests on changed since parent branch with coverage
run: npm run test -- --changedSince=origin/${{ github.base_ref }}
- name: Check linting on all files
run: npm run lint
# This is a temp fix until stylelint action fixes its issue
# https://github.com/reviewdog/reviewdog/issues/1158#issuecomment-1097649732
- name: Stylelint Owner Fix
run: sudo chown -R root:root $GITHUB_WORKSPACE
- name: stylelint
uses: reviewdog/action-stylelint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
reporter: github-pr-review
filter_mode: "diff_context"
stylelint_config: ".stylelintrc.json"
stylelint_input: "**/*.scss"