11name : CI
22
3- on :
4- push :
5- branches : [master]
6- pull_request :
7- branches : [master]
3+ on : [push, pull_request, workflow_dispatch]
84
95jobs :
106 build :
3733 - name : Run linter
3834 run : yarn lint
3935
40- - name : Run tests
41- run : yarn test
42-
4336 - name : Pack
4437 run : yarn pack
4538
4841 name : package
4942 path : ./package.tgz
5043
44+ test-dist :
45+ name : Test against dist
46+ needs : [build]
47+ runs-on : ubuntu-latest
48+ strategy :
49+ fail-fast : false
50+ matrix :
51+ node : ['20.x']
52+ steps :
53+ - name : Checkout repo
54+ uses : actions/checkout@v4
55+
56+ - name : Use node ${{ matrix.node }}
57+ uses : actions/setup-node@v4
58+ with :
59+ node-version : ${{ matrix.node }}
60+ cache : ' yarn'
61+
62+ - name : Install deps
63+ run : yarn install
64+
65+ - name : Download build artifact
66+ uses : actions/download-artifact@v4
67+ with :
68+ name : package
69+ path : .
70+
71+ - run : ls -lah
72+
73+ - name : Install build artifact
74+ run : yarn add ./package.tgz
75+
76+ - name : Erase path aliases
77+ run : sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json
78+
79+ - name : Run tests, against dist
80+ env :
81+ TEST_DIST : true
82+ run : yarn test
83+
5184 test-types :
5285 name : Test Types with TypeScript ${{ matrix.ts }}
5386 needs : [build]
@@ -69,16 +102,30 @@ jobs:
69102 node-version : ${{ matrix.node }}
70103 cache : ' yarn'
71104
105+ - name : Download build artifact
106+ uses : actions/download-artifact@v4
107+ with :
108+ name : package
109+ path : .
110+
72111 - name : Install deps
73112 run : yarn install
74113
75114 - name : Install TypeScript ${{ matrix.ts }}
76115 run : yarn add typescript@${{ matrix.ts }}
77116
117+ - name : Install build artifact
118+ run : yarn add ./package.tgz
119+
120+ - name : Erase path aliases
121+ run : sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json
122+
78123 - name : Test types
124+ env :
125+ TEST_DIST : true
79126 run : |
80127 yarn tsc --version
81- yarn test:typescript
128+ yarn type-tests
82129
83130 test-published-artifact :
84131 name : Test Published Artifact ${{ matrix.example }}
0 commit comments