Check #118
This file contains 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: Check | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
schedule: | |
- cron: "0 4 * * *" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}-${{ github.event_name }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./ | |
jobs: | |
run_checks: | |
runs-on: ubuntu-latest | |
name: Run health checks | |
steps: | |
- name: "Fetch current Git commit history" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup turbo caches | |
uses: actions/cache@v4 | |
with: | |
path: | | |
./.turbo/ | |
!./.turbo/runs/ | |
key: ${{ runner.os }}-turbo-${{ github.workflow }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo-${{ github.workflow }}- | |
${{ runner.os }}-turbo- | |
save-always: true | |
- name: Setup tooling caches | |
uses: actions/cache@v4 | |
with: | |
path: | | |
./.*cache | |
./*/.*cache | |
./*/tsc-out/.*tsbuildinfo | |
key: ${{ runner.os }}-tooling-${{ github.workflow }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-tooling-${{ github.workflow }}- | |
${{ runner.os }}-tooling- | |
save-always: true | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
package_json_file: package.json | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: pnpm | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Run checks | |
run: | | |
pnpm run turbo run \ | |
formatter__check \ | |
compiler__check \ | |
build | |
- name: Save turbo logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: turbo-run-logs | |
path: ./.turbo/runs/ | |
if-no-files-found: warn | |
retention-days: 1 |