Skip to content

Native scroll

Native scroll #2599

name: PR Test & Lint
on:
pull_request:
paths-ignore:
- 'docs/**'
# Ensures that only one deploy task per branch/environment will run at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Jest Test
run: pnpm jest
- uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: junit.xml
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: pnpm
- name: Cache ESLint
uses: actions/cache@v3
env:
cache-name: cache-eslint
with:
path: ~/.eslintcache
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('.eslintrc') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('.eslintrc') }}
${{ runner.os }}-${{ env.cache-name }}-
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Prettier
run: pnpm lint:prettier
- name: StyleLint
run: pnpm lint:stylelint
- name: ESLint (Forked)
if: github.event.pull_request.head.repo.full_name != github.repository
run: pnpm lintcached
- name: Save ESLint Report JSON (Non-Forked)
if: github.event.pull_request.head.repo.full_name == github.repository
run: pnpm lint-report:cached
continue-on-error: true
- name: Annotate ESLint Results
if: github.event.pull_request.head.repo.full_name == github.repository
uses: ataylorme/eslint-annotate-action@v2
continue-on-error: true
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
report-json: "eslint.results.json"
fail-on-warning: true