-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (56 loc) · 1.8 KB
/
module-build.yaml
File metadata and controls
68 lines (56 loc) · 1.8 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
name: Module - Build
on:
workflow_call:
inputs:
packages-build:
type: string
description: A comma-separated list of packages to build
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install TypeScript compiler
run: npm i -g typescript@5.9.3
- name: Install Dependencies and Build TypeScript
run: |
IFS=',' read -r -a buildPackages <<< "${{ inputs.packages-build }}"
for buildPackage in "${buildPackages[@]}"; do
cd $buildPackage
echo "@codbex:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${{ secrets.GH_TOKEN }}" > .npmrc
npm install
rm -rf .npmrc
cd ../
done
IFS=',' read -r -a buildPackages <<< "${{ inputs.packages-build }}"
for buildPackage in "${buildPackages[@]}"; do
cd $buildPackage
tsc --pretty > tsc-output.log 2>&1 || true
cd ../
done
for buildPackage in "${buildPackages[@]}"; do
cd $buildPackage
grep -v 'TS2688' tsc-output.log > filtered-tsc-output.log
cd ../
done
echo "Print Filtered Errors"
for buildPackage in "${buildPackages[@]}"; do
cd $buildPackage
cat filtered-tsc-output.log
cd ../
done
echo "Fail on Non-Ignored Errors"
for buildPackage in "${buildPackages[@]}"; do
cd $buildPackage
if grep -q 'error TS' filtered-tsc-output.log; then
exit 1
fi
cd ../
done