@@ -41,48 +41,31 @@ jobs:
4141 with :
4242 node-version : ${{ matrix.node-version }}
4343 - run : npm --version
44- - run : npm install --verbose
45- working-directory : packages/${{ matrix.package }}
46- - name : Link dependent packages (*nix)
47- if : matrix.os == 'ubuntu-latest'
48- working-directory : packages/${{ matrix.package }}
44+ - name : Install dependencies
4945 run : |
50- # depending on which package we are testing, also npm link up dependent packages within this monorepo
51- case "$PWD" in
52- */webhook) pushd ../types && npm i && popd && npm link ../types;;
53- */web-api) pushd ../types && npm i && popd && npm link ../types && pushd ../logger && npm i && popd && npm link ../logger;;
54- */oauth) pushd ../logger && npm i && popd && npm link ../logger && pushd ../web-api && npm i && popd && npm link ../web-api;;
55- */socket-mode) pushd ../logger && npm i && popd && npm link ../logger && pushd ../web-api && npm i && popd && npm link ../web-api;;
56- *) ;; # default
57- esac
58- - name : Link dependent packages (Windows)
59- if : matrix.os == 'windows-latest'
60- working-directory : packages/${{ matrix.package }}
46+ npm install --verbose
47+ - name : Build packages
48+ run : |
49+ # Build packages without internal dependencies
50+ npm run build --workspace=@slack/cli-hooks
51+ npm run build --workspace=@slack/cli-test
52+
53+ # Build base dependencies
54+ npm run build --workspace=@slack/logger
55+ npm run build --workspace=@slack/types
56+
57+ # Build packages requiring base dependencies
58+ npm run build --workspace=@slack/web-api
59+ npm run build --workspace=@slack/webhook
60+
61+ # Build packages that depend on the Web API
62+ npm run build --workspace=@slack/oauth
63+ npm run build --workspace=@slack/rtm-api
64+ npm run build --workspace=@slack/socket-mode
65+ - name : Run tests
6166 run : |
62- # depending on which package we are testing, also npm link up dependent packages within this monorepo
63- # NOTE: the following is PowerShell
64- echo "$pwd"
65- switch -Wildcard ( "$pwd" )
66- {
67- '*\webhook'
68- {
69- pushd ..\types && npm i && popd && npm link ..\types
70- }
71- '*\web-api'
72- {
73- pushd ..\types && npm i && popd && npm link ..\types && pushd ..\logger && npm i && popd && npm link ..\logger
74- }
75- '*\oauth'
76- {
77- pushd ..\logger && npm i && popd && npm link ..\logger && pushd ..\web-api && npm i && popd && npm link ..\web-api
78- }
79- '*\socket-mode'
80- {
81- pushd ..\logger && npm i && popd && npm link ..\logger && pushd ..\web-api && npm i && popd && npm link ..\web-api
82- }
83- }
84- - run : npm test
85- working-directory : packages/${{ matrix.package }}
67+ npm run lint
68+ npm test --workspace=@slack/${{ matrix.package }}
8669 - name : Check for coverage report existence
8770 id : check_coverage
8871 uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
0 commit comments