-
Notifications
You must be signed in to change notification settings - Fork 42
39 lines (31 loc) · 907 Bytes
/
ts.yaml
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
name: Lint TypeScript
on:
pull_request:
branches:
- master
paths:
- "ts/**"
env:
NPM_CONFIG_REGISTRY: ${{ vars.NPM_CONFIG_REGISTRY }}
jobs:
lint:
runs-on: ${{ vars.RUNNER_UBUNTU && fromJSON(vars.RUNNER_UBUNTU) || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Dependencies
run: |
# install yarn if needed
npm i -g yarn
# switch registry in lock file
if [ -n "${{ env.NPM_CONFIG_REGISTRY }}" ]; then
sed -i'.bak' 's#https://registry.npmjs.org#${{ env.NPM_CONFIG_REGISTRY }}#' yarn.lock
rm yarn.lock.bak
fi
yarn install --frozen-lockfile
working-directory: ts
- name: Check Code Formatting
run: yarn tidy:check
working-directory: ts