1+ # Reuable workflow for compiling and testing extension.
2+ name : Compile and test extension
3+
4+ on :
5+ workflow_call :
6+ inputs :
7+ runner-env :
8+ required : true
9+ type : string
10+ platform :
11+ # Expects 'mac', 'linux', or 'windows'
12+ required : true
13+ type : string
14+ yarn-args :
15+ type : string
16+
17+ jobs :
18+ build :
19+ runs-on : ${{ inputs.runner-env }}
20+
21+ steps :
22+ - uses : actions/checkout@v3
23+
24+ - name : Use Node.js 16
25+ uses : actions/setup-node@v3
26+ with :
27+ node-version : 16
28+
29+ - name : Install Dependencies
30+ run : yarn install ${{ inputs.yarn-args }}
31+ working-directory : Extension
32+
33+ - name : Compile Sources
34+ run : yarn run compile
35+ working-directory : Extension
36+
37+ - name : Run Linter
38+ run : yarn run lint
39+ working-directory : Extension
40+
41+ - name : Run unit tests
42+ run : yarn test
43+ working-directory : Extension
44+
45+ # NOTE : We can't run the test that require the native binary files
46+ # yet -- there will be an update soon that allows the tester to
47+ # acquire them on-the-fly
48+ # - name: Run languageServer integration tests
49+ # if: ${{ inputs.platform == 'windows' }}
50+ # run: yarn test --scenario=SingleRootProject
51+ # working-directory: Extension
52+
53+ # - name: Run E2E IntelliSense features tests
54+ # if: ${{ inputs.platform == 'windows' }}
55+ # run: yarn test --scenario=MultirootDeadlockTest
56+ # working-directory: Extension
57+
58+ # NOTE: For mac/linux run the tests with xvfb-action for UI support.
59+ # Another way to start xvfb https://github.com/microsoft/vscode-test/blob/master/sample/azure-pipelines.yml
60+
61+ # - name: Run languageServer integration tests (xvfb)
62+ # if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
63+ # uses: coactions/setup-xvfb@v1
64+ # with:
65+ # run: yarn test --scenario=SingleRootProject
66+ # working-directory: Extension
67+
68+ # - name: Run E2E IntelliSense features tests (xvfb)
69+ # if: ${{ inputs.platform == 'mac' || inputs.platform == 'linux' }}
70+ # uses: coactions/setup-xvfb@v1
71+ # with:
72+ # run: yarn test --scenario=MultirootDeadlockTest
73+ # working-directory: Extension
0 commit comments