Skip to content

Commit 93fd21a

Browse files
authored
fix: update test action to only do checks on linux (#1966)
2 parents 9c2ebd8 + 3c84d06 commit 93fd21a

File tree

1 file changed

+16
-43
lines changed

1 file changed

+16
-43
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -22,47 +22,6 @@ on:
2222
default: false
2323

2424
jobs:
25-
run-checks:
26-
name: Run Checks on ${{ matrix.os }}
27-
28-
runs-on: ${{ matrix.os }}
29-
30-
strategy:
31-
matrix:
32-
# Make sure the ubuntu version matches with the other job and env values
33-
os: [ubuntu-22.04]
34-
35-
steps:
36-
- name: Check out Git repository
37-
uses: actions/checkout@v4
38-
39-
- name: Read package.json
40-
id: package_json
41-
uses: zoexx/[email protected]
42-
with:
43-
file_path: 'package.json'
44-
45-
- name: Install Node.js and NPM
46-
uses: actions/setup-node@v4
47-
with:
48-
node-version: ${{ fromJson(steps.package_json.outputs.volta).node }}
49-
cache: npm
50-
51-
- name: Install packages
52-
run: npm ci
53-
54-
# build:main has to run before typecheck as it creates buildInfo.json which typecheck requires
55-
- name: type checking
56-
run: |
57-
npm run build:main
58-
npm run typecheck
59-
60-
- name: check JS/TS formatting
61-
run: npm run format:check
62-
63-
- name: check JS/TS linting
64-
run: npm run lint
65-
6625
test:
6726
name: Build on ${{ matrix.os }}, .Net ${{ matrix.dotnet_version }}
6827

@@ -168,6 +127,13 @@ jobs:
168127
- name: Install packages
169128
run: npm ci
170129

130+
# build:main has to run before typecheck as it creates buildInfo.json which typecheck requires
131+
- name: type checking
132+
if: ${{ matrix.os == env.OS_LINUX }}
133+
run: |
134+
npm run build:main
135+
npm run typecheck
136+
171137
- name: Build
172138
run: npm run build
173139

@@ -192,14 +158,21 @@ jobs:
192158
- name: npm unit tests
193159
run: npm test
194160

195-
# I didn't move this to checks because it only takes a few seconds
196-
# and each OS has to install this anyway.
197161
- name: check dotnet formatting
162+
if: ${{ matrix.os == env.OS_LINUX }}
198163
run: |
199164
cd c-sharp
200165
dotnet tool restore
201166
dotnet csharpier --check .
202167
168+
- name: check JS/TS formatting
169+
if: ${{ matrix.os == env.OS_LINUX }}
170+
run: npm run format:check
171+
172+
- name: check JS/TS linting
173+
if: ${{ matrix.os == env.OS_LINUX }}
174+
run: npm run lint
175+
203176
- name: check packaging
204177
env:
205178
# no hardlinks so dependencies are copied

0 commit comments

Comments
 (0)