Repository navigation
85 lines (67 loc) · 2.88 KB
/
Copy pathcheck.yml
File metadata and controls
85 lines (67 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Check
# Validates repository formatting, the type graph, and website docs.
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
check:
name: Check
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Checkout distilled
run: git submodule update --init --depth=1 --checkout -- submodules/distilled
- name: Restore Astro build cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: website/node_modules/.astro
key: website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-${{ github.sha }}-${{ github.workflow }}-${{ github.run_attempt }}
restore-keys: |
website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-${{ github.sha }}-
website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-
website-astro-check-${{ runner.os }}-main-
- name: Setup pnpm, Node.js, Bun and install dependencies
uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
with:
cache: true
install: true
require-lockfile: true
- name: Check formatting
run: pnpm format:check
- name: Check package versions
run: pnpm validate:publish-packages
- name: Typecheck
run: pnpm typecheck
# Must run after the type check: it reads distilled's emitted `lib/*.d.ts`,
# and stale/missing declarations resolve to `any`.
- name: Lint providers
run: pnpm lint:providers
# Type-aware, so it also needs the build above.
- name: Run Lint
run: pnpm lint
- name: Run Node Utils tests
run: pnpm -C packages/node-utils test
- name: Run pkg tests
run: pnpm -C packages/pkg test
- name: Test CLI launcher
run: timeout 240 pnpm test test/Cli/launcher.test.ts test/Cli/exitCodes.test.ts --retry 0 --concurrency 1
- name: Check API JSDocs
run: pnpm docs:check-jsdoc
# An internal PR carrying `deploy-website` gets a full Astro build in
# website.yml via StaticSite. That build runs the same output validators,
# so avoid building the site a second time here. Forks still run this
# check because they cannot access the preview deployment secrets.
- name: Check website docs
if: >-
github.event.pull_request.head.repo.full_name != github.repository ||
!contains(github.event.pull_request.labels.*.name, 'deploy-website')
run: pnpm docs:check