Repository navigation
48 lines (40 loc) · 1.63 KB
/
Copy pathlint.yml
File metadata and controls
48 lines (40 loc) · 1.63 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
name: lint
on:
pull_request:
branches:
- master
push:
branches:
- master
# Cancel a currently running workflow from the same PR/branch/tag
# when a new workflow is triggered. A release commit (`chore: release ...`)
# gets a group of its own on push so it never cancels its parent's
# still-running checks: when it only bumps the version
# (.github/actions/version-only), its native jobs skip and publish.yml relies
# on the parent's native-required.
concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore: release ') && github.sha) || github.ref }}"
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.0
- name: Install Dependency
run: bun install --frozen-lockfile
# `bun lint` ends with check-native-spec-parity.js (every
# src/NativePushy.ts method must be implemented by all three native
# modules) and generate-contract.ts --check (every region generated from
# scripts/contract.ts and the calling-side declarations is current).
- name: Run lint
run: bun lint
# check-packlist.js requires the emitted declarations that
# package.json `types` points at.
- name: Build type declarations
run: bun build:types
- name: Verify publish file list
run: node scripts/check-packlist.js