@@ -35,26 +35,27 @@ jobs:
35
35
36
36
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
37
37
- name : Checkout
38
- uses : actions/checkout@v2
38
+ uses : actions/checkout@v3
39
39
with :
40
40
fetch-depth : 0
41
41
42
42
- name : Setup Node.js Environment
43
- uses : actions/setup-node@v2.1.2
43
+ uses : actions/setup-node@v3
44
44
with :
45
45
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0
46
- node-version : ^ 16.16.0
46
+ node-version : 16.x
47
47
48
48
- name : Run node-gyp bug workaround script
49
49
run : |
50
50
curl -sSfLO https://raw.githubusercontent.com/mongodb-js/compass/42e6142ae08be6fec944b80ff6289e6bcd11badf/.evergreen/node-gyp-bug-workaround.sh && bash node-gyp-bug-workaround.sh
51
51
52
- - name : Install npm@8.3.1
53
- run : npm install -g npm@8.3.1
52
+ - name : Install npm
53
+ run : npm install -g npm@8.19.4
54
54
55
55
- name : Install Dependencies
56
56
shell : bash
57
- run : npm ci --omit=optional
57
+ run : |
58
+ npm ci --omit=optional
58
59
59
60
- name : Run Checks
60
61
run : npm run check
63
64
shell : bash
64
65
65
66
- name : Run Tests
66
- run : npm run test
67
+ run : |
68
+ npm run test
67
69
shell : bash
68
70
69
71
- name : Prepare build for release
96
98
name : VSIX built on ${{ runner.os }}
97
99
path : " *.vsix"
98
100
101
+ - name : Run Snyk Test
102
+ if : runner.os == 'Linux'
103
+ shell : bash
104
+ env :
105
+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
106
+ run : |
107
+ npm run snyk-test > /dev/null 2>&1
108
+
109
+ - name : Create Jira Tickets
110
+ if : >
111
+ runner.os == 'Linux' &&
112
+ (
113
+ github.event_name == 'push' && github.ref == 'refs/heads/main' ||
114
+ github.event_name == 'workflow_dispatch' ||
115
+ github.event_name == 'schedule'
116
+ )
117
+ shell : bash
118
+ env :
119
+ JIRA_API_TOKEN : ${{ secrets.JIRA_API_TOKEN }}
120
+ JIRA_BASE_URL : " https://jira.mongodb.org"
121
+ JIRA_PROJECT : " VSCODE"
122
+ JIRA_VULNERABILITY_BUILD_INFO : " - [GitHub Run|https://github.com/mongodb-js/vscode/actions/runs/${{github.run_id}}/jobs/${{github.job}}]"
123
+ run : |
124
+ npm run create-jira-tickets > /dev/null
125
+
126
+ - name : Generate Vulnerability Report (Fail on >= High)
127
+ if : runner.os == 'Linux'
128
+ continue-on-error : ${{ github.event_name == 'pull_request' }}
129
+ shell : bash
130
+ run : |
131
+ # The standard output is suppressed since Github Actions logs are
132
+ # available for everyone with read access to the repo, which is everyone that is
133
+ # logged in for public repos.
134
+ # This command is only here to fail on failures for `main` and tags.
135
+ npm run generate-vulnerability-report > /dev/null
136
+
99
137
- name : Create Draft Release
100
138
run : |
101
139
echo Creating draft release for: "${RELEASE_TAG}"
0 commit comments