Skip to content

Bump @typescript-eslint/parser from 7.0.1 to 7.10.0 (#419) #617

Bump @typescript-eslint/parser from 7.0.1 to 7.10.0 (#419)

Bump @typescript-eslint/parser from 7.0.1 to 7.10.0 (#419) #617

Workflow file for this run

name: 'Build and test'
on:
pull_request:
push:
branches:
- main
env:
NODE_VERSION: '20.x'
jobs:
build_cache:
name: 'Build Cache'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Output cache metadata'
id: cache_metadata
run: |
{
echo "key=${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}"
echo "yarn_path=$(yarn config get cacheFolder)"
echo "modules_path=./node_modules"
} >> "$GITHUB_OUTPUT"
- name: 'Check for existing yarn cache'
uses: actions/cache@v4
id: yarn_cache
with:
key: ${{ steps.cache_metadata.outputs.key }}
path: ${{ steps.cache_metadata.outputs.yarn_path }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Check for existing node_modules cache'
uses: actions/cache@v4
id: modules_cache
with:
key: ${{ steps.cache_metadata.outputs.key }}
path: ${{ steps.cache_metadata.outputs.modules_path }}
restore-keys: |
${{ runner.os }}-modules-
- name: 'Use Node ${{ env.NODE_VERSION }}'
if: steps.yarn_cache.outputs.cache-hit != 'true' || steps.modules_cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: 'Install dependencies'
if: steps.yarn_cache.outputs.cache-hit != 'true' || steps.modules_cache.outputs.cache-hit != 'true'
run: yarn install
outputs:
key: ${{ steps.cache_metadata.outputs.key }}
yarn_path: ${{ steps.cache_metadata.outputs.yarn_path }}
modules_path: ${{ steps.cache_metadata.outputs.modules_path }}
test:
name: 'Unit tests'
runs-on: ubuntu-latest
needs: [ build_cache ]
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Use Node.js ${{ env.NODE_VERSION }}'
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: 'Restore yarn cache'
uses: actions/cache@v4
with:
key: ${{ needs.build_cache.outputs.key }}
path: ${{ needs.build_cache.outputs.yarn_path }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Restore node_modules cache'
uses: actions/cache@v4
with:
key: ${{ needs.build_cache.outputs.key }}
path: ${{ needs.build_cache.outputs.modules_path }}
restore-keys: |
${{ runner.os }}-modules-
- name: 'Run tests'
run: yarn test
lint_and_format:
name: 'Lint & format'
runs-on: ubuntu-latest
needs: [ build_cache ]
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Use Node.js ${{ env.NODE_VERSION }}'
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: 'Get yarn cache'
uses: actions/cache@v4
with:
key: ${{ needs.build_cache.outputs.key }}
path: ${{ needs.build_cache.outputs.yarn_path }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Get node modules cache'
uses: actions/cache@v4
with:
key: ${{ needs.build_cache.outputs.key }}
path: ${{ needs.build_cache.outputs.modules_path }}
restore-keys: |
${{ runner.os }}-modules-
- name: 'Check format'
continue-on-error: true
run: yarn format-check
- name: 'Lint'
run: yarn lint
check_dist:
name: 'Check dist'
runs-on: ubuntu-latest
needs: [ build_cache ]
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Use Node.js ${{ env.NODE_VERSION }}'
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: 'Get yarn cache'
uses: actions/cache@v4
with:
key: ${{ needs.build_cache.outputs.key }}
path: ${{ needs.build_cache.outputs.yarn_path }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Get node modules cache'
uses: actions/cache@v4
with:
key: ${{ needs.build_cache.outputs.key }}
path: ${{ needs.build_cache.outputs.modules_path }}
restore-keys: |
${{ runner.os }}-modules-
- name: 'Build dist'
run: yarn package
- name: 'Detect uncommitted changes'
run: |
if [[ "$( git diff --name-only | grep dist )" != "" ]]; then
echo "::error file=dist/index.js,title=Uncompiled Source::Detected changes in dist/ directory after running 'yarn package'. Please run 'yarn package' and commit the results."
exit 1
fi
slack_summary:
name: 'Post summary to Slack'
runs-on: ubuntu-latest
if: always() && github.event_name == 'push' # Only run on main
needs:
- test
- lint_and_format
- check_dist
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Post summary'
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
success-emoji: ':heavy-check-mark:'
skipped-emoji: ':heavy-minus-sign:'
failed-emoji: ':heavy-cross-mark:'