File tree Expand file tree Collapse file tree 3 files changed +85
-33
lines changed
Expand file tree Collapse file tree 3 files changed +85
-33
lines changed Original file line number Diff line number Diff line change 1+ name : build
2+
3+ on :
4+ workflow_call :
5+ workflow_dispatch :
6+ push :
7+ branches :
8+ - ' master'
9+ tags :
10+ - ' *'
11+ pull_request :
12+ branches :
13+ - ' **'
14+ release :
15+
16+ permissions :
17+ contents : read
18+ id-token : write
19+
20+ jobs :
21+ build :
22+ runs-on : ubuntu-latest
23+ steps :
24+ - name : Checkout
25+ uses : actions/checkout@v3
26+ - name : Install Node.js
27+ uses : actions/setup-node@v3
28+ with :
29+ node-version : 17
30+ - name : install dependencies
31+ run : |
32+ yarn install
33+
34+ - name : Compile
35+ run : yarn compile
36+
37+ - name : Lint
38+ run : yarn lint
39+
40+ - name : What is the OS
41+ run : cat /etc/*-release
42+
43+ # Tests if using Linux
44+ - name : install xvfb
45+ run : sudo apt-get update && sudo apt-get install -y xvfb
46+ if : runner.os == 'Linux'
47+
48+ - name : Run Tests and Generate XML Report
49+ run : xvfb-run -a yarn test
50+ if : runner.os == 'Linux'
51+
52+ # Tests if not using Linux
53+ - name : Non-Linux Tests
54+ run : yarn test
55+ if : runner.os != 'Linux'
56+
57+ - name : Debug Path
58+ run : ls -R out
59+
60+ - name : Upload XML Test Report
61+ uses : actions/upload-artifact@v4
62+ with :
63+ name : test-reports
64+ path : out/test
65+
66+ - name : Upload Test Artifacts
67+ uses : actions/upload-artifact@v4
68+ with :
69+ name : Artifacts
70+ path : artifacts/file.txt
71+
72+ # Generate vsix file and upload the artifact
73+ - name : generate .vsix file
74+ run : yarn package
75+
76+ - name : Upload .vsix Artifact
77+ uses : actions/upload-artifact@v4
78+ with :
79+ name : vs-code-extension
80+ path : " *.vsix"
Original file line number Diff line number Diff line change 1- FROM amazonlinux:2
2-
3- WORKDIR /usr/src/extension
4-
5- COPY . .
6-
7- RUN yum install -y \
8- gzip \
9- tar
10-
11- RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash && \
12- . ~/.nvm/nvm.sh && \
13- nvm install 17 && \
14- npm install yarn -g && \
15- yarn install && \
16- yarn compile && \
17- yarn lint
18-
19- ARG BUILD_ID
20-
21- RUN yum update -y && \
22-
23- yum upgrade -y && \
24-
25- yum autoremove -y && \
26-
27- yum clean all && \
28-
29- rm -rf /var/cache/yum
30-
31- USER nobody
1+ FROM scratch
Original file line number Diff line number Diff line change 6262 "compile" : " tsc -p ./" ,
6363 "lint" : " eslint src --ext ts" ,
6464 "watch" : " tsc -watch -p ./" ,
65- "test" : " node ./out/test/run_tests.js"
65+ "test" : " node ./out/test/run_tests.js" ,
66+ "package" : " vsce package -o ./vs-code-format-on-save.vsix"
6667 },
6768 "icon" : " images/OverReact_Logo.png" ,
6869 "devDependencies" : {
7677 "glob" : " ^7.1.6" ,
7778 "mocha" : " ^7.1.1" ,
7879 "typescript" : " ^3.8.3" ,
79- "vscode-test" : " ^1.3.0"
80+ "vscode-test" : " ^1.3.0" ,
81+ "@vscode/vsce" : " ^2.19.0"
8082 },
8183 "dependencies" : {
8284 "@types/semver" : " ^7.2.0" ,
You can’t perform that action at this time.
0 commit comments