Skip to content

Commit c2a1caf

Browse files
committed
add debugging code
1 parent 72234d5 commit c2a1caf

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.github/workflows/integration-test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ env:
1717

1818
jobs:
1919
build:
20-
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os:
24+
- ubuntu-latest
25+
- macos-latest
26+
- macos-latest-xlarge
27+
runs-on: ${{ matrix.os }}
2128
steps:
2229
- name: Checkout repository
2330
uses: actions/checkout@v3
@@ -51,7 +58,7 @@ jobs:
5158
- name: Download results
5259
uses: actions/download-artifact@v4
5360
with:
54-
name: results-push
61+
name: ${{ runner.name }}-results-push
5562
path: artifact
5663
- name: Check results
5764
working-directory: artifact

src/actions.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@ import { context, getOctokit } from '@actions/github'
44
import { retry } from '@octokit/plugin-retry'
55
import { Md5 } from 'ts-md5'
66

7-
export async function uploadArtifact(artifactName: string, ...files: string[]) {
8-
await create.uploadArtifact(artifactName, files, '.')
7+
const artifact = new DefaultArtifactClient()
8+
9+
export function uploadArtifact(artifactName: string, ...files: string[]): int {
10+
startGroup('Uploading artifact ' + artifactName)
11+
const { id, size } = await artifact.uploadArtifact(artifactName, files, '.')
12+
if (id === undefined) {
13+
throw new Error('Failed to upload artifact ' + artifactName)
14+
}
915
endGroup()
16+
return id
1017
}
1118

1219
export async function downloadArtifact(artifactName: string) {

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ async function displayResults() {
8686
const downloadStart = Date.now()
8787
await downloadArtifact('results-old')
8888
await downloadArtifact('results-new')
89+
console.log('Old report:', oldReport)
90+
console.log('New report:', newReport)
8991
telemetryCollector.addField(
9092
'duration.download-artifacts',
9193
(Date.now() - downloadStart).toString()

0 commit comments

Comments
 (0)