ci: frontend ts check v1 #1
Workflow file for this run
This file contains hidden or 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
name: CI@frontend - TS Check | |
on: | |
push: | |
paths: | |
- 'frontend/**' | |
- '.github/workflows/frontend-tsc-ci.yaml' | |
pull_request: | |
paths: | |
- 'frontend/**' | |
- '.github/workflows/frontend-tsc-ci.yaml' | |
jobs: | |
setup: | |
name: Setup jobs | |
runs-on: ubuntu-latest | |
env: | |
NODE_VERSION: '18' | |
# should be ci trigger user | |
GIT_USER_NAME: 'mocayo' | |
GIT_USER_EMAIL: '[email protected]' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Config Git User | |
run: | | |
git config --local user.name ${{ env.GIT_USER_NAME }} | |
git config --local user.email ${{ env.GIT_USER_EMAIL }} | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
common/temp/pnpm-local | |
common/temp/pnpm-store | |
common/temp/install-run | |
key: ${{ runner.os }}-rush-store-${{ hashFiles('common/config/subspaces/default/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-rush-store-main | |
${{ runner.os }}-rush-store | |
- name: Branch Diff | |
id: branch-diff | |
run: | | |
TARGET_BRANCH="${GITHUB_BASE_REF:-main}" | |
git fetch origin $TARGET_BRANCH | |
sh .github/scripts/branch-diff.sh origin/$TARGET_BRANCH > changed.json | |
echo "file=changed.json" >> "$GITHUB_OUTPUT" | |
- name: Install Dependencies | |
run: | | |
node common/scripts/install-run-rush.js increment --action install -p ${{ steps.branch-diff.outputs.file }} | |
- name: Prepare Basic Packages | |
run: | | |
node common/scripts/install-run-rush.js pre-build -v | |
- name: Lint & Style | |
run: | | |
node common/scripts/install-run-rush.js increment --action ts-check -p ${{ steps.branch-diff.outputs.file }} | |
node common/scripts/install-run-rush.js increment --action style -p ${{ steps.branch-diff.outputs.file }} |