Skip to content

engrams dont care about no stinking bucket #4744

engrams dont care about no stinking bucket

engrams dont care about no stinking bucket #4744

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@v6
- uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Cache Manifest
id: destiny-manifest
uses: actions/cache@v4
with:
path: manifest-cache
key: destiny-manifest-${{ github.run_id }}
restore-keys: |
destiny-manifest
- name: Jest Test
run: pnpm test
env:
CLEAN_MANIFEST_CACHE: true
- uses: actions/upload-artifact@v5 # 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@v6
- uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
cache: pnpm
- name: Cache ESLint
uses: actions/cache@v4
env:
cache-name: cache-eslint
with:
path: |
.eslintcache
key: ${{ runner.os }}-eslint-${{ hashFiles('**/pnpm-lock.json', '**/eslint.config.js') }}
- 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 || github.actor == 'dependabot[bot]' }}
run: pnpm lintcached
- name: Save ESLint Report JSON (Non-Forked)
id: eslint-continue
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
run: pnpm lint-report:cached
continue-on-error: true
- name: Annotate ESLint Results
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
uses: ataylorme/eslint-annotate-action@v3
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
report-json: "eslint.results.json"
fail-on-warning: false
fail-on-error: false
- name: Show ESLint Summary and Failures
if : steps.eslint-continue.outcome == 'failure'
run: |
ERRORS=$(cat eslint.results.json | jq '[.[] | select(.errorCount > 0)] | length')
WARNINGS=$(cat eslint.results.json | jq '[.[] | select(.warningCount > 0)] | length')
echo "Files with errors: $ERRORS"
echo "Files with warnings: $WARNINGS"
if [ "$ERRORS" -gt 0 ]; then
echo "::error::Found linting errors in $ERRORS files"
pnpm lintcached
exit 1
fi