File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,35 +152,3 @@ jobs:
152152
153153 - name : ' Get output'
154154 run : ' echo "${{ steps.upload.outputs.uploaded }}"'
155-
156- mocha :
157- if : ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
158- name : ' mocha'
159- runs-on : ' ${{ matrix.os }}'
160- strategy :
161- fail-fast : false
162- matrix :
163- os :
164- - ' ubuntu-latest'
165- - ' windows-latest'
166- - ' macos-latest'
167-
168- steps :
169- - uses : ' actions/checkout@v2'
170-
171- - uses : ' actions/setup-node@v2'
172- with :
173- node-version : ' 12.x'
174-
175- - name : ' npm build'
176- run : ' npm ci && npm run build'
177-
178- - uses : ' google-github-actions/auth@main'
179- with :
180- credentials_json : ' ${{ secrets.UPLOAD_CLOUD_STORAGE_GCP_SA_KEY_JSON }}'
181-
182- - name : ' npm test'
183- run : ' npm run test'
184- env :
185- UPLOAD_CLOUD_STORAGE_TEST_BUCKET : ' ${{ secrets.UPLOAD_CLOUD_STORAGE_TEST_BUCKET }}'
186- UPLOAD_CLOUD_STORAGE_TEST_PROJECT : ' ${{ secrets.UPLOAD_CLOUD_STORAGE_PROJECT }}'
Original file line number Diff line number Diff line change 1717 unit :
1818 name : ' unit'
1919 runs-on : ' ${{ matrix.os }}'
20+
21+ permissions :
22+ contents : ' read'
23+ id-token : ' write'
24+
2025 strategy :
2126 fail-fast : false
2227 matrix :
3843 - name : ' npm lint'
3944 # There's no need to run the linter for each operating system, since it
4045 # will find the same thing 3x and clog up the PR review.
41- if : ${{matrix.os == 'ubuntu-latest'}}
46+ if : ${{ matrix.os == 'ubuntu-latest' }}
4247 run : ' npm run lint'
4348
49+ # Only authenticate if this is a full CI run.
50+ - uses : ' google-github-actions/auth@main'
51+ with :
52+ workload_identity_provider : ' ${{ secrets.WIF_PROVIDER_NAME }}'
53+ service_account : ' ${{ secrets.UPLOAD_CLOUD_STORAGE_GCP_SA_EMAIL }}'
54+ if : ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }}
55+
56+ # The secrets will only be injected in pushes to main or from maintainers.
57+ # If they aren't present, the associated steps are skipped.
4458 - name : ' npm test'
4559 run : ' npm run test'
60+ env :
61+ UPLOAD_CLOUD_STORAGE_TEST_BUCKET : ' ${{ secrets.UPLOAD_CLOUD_STORAGE_TEST_BUCKET }}'
62+ UPLOAD_CLOUD_STORAGE_TEST_PROJECT : ' ${{ secrets.UPLOAD_CLOUD_STORAGE_PROJECT }}'
You can’t perform that action at this time.
0 commit comments