Skip to content

Commit 542cae4

Browse files
committed
feat: add artifact attestation verification
1 parent 7ee6d30 commit 542cae4

12 files changed

Lines changed: 37550 additions & 4234 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,15 @@ jobs:
4444
uses: ./
4545
with:
4646
fail-on-unsigned: true
47+
48+
verify-artifacts:
49+
runs-on: ubuntu-latest
50+
needs: build-and-test
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Verify dist/index.js attestation
55+
uses: ./
56+
with:
57+
artifact-paths: 'dist/index.js'
58+
fail-on-unattested: false

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ dist/**/*.d.ts.map
1212

1313
# Local tool directories
1414
.deepeval/
15-
.flow/
15+
.flow/
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Integration tests for artifact verification in main.ts run() flow.
3+
*
4+
* Since run() is called at module load time, we use jest.isolateModules
5+
* to re-import the module with different mock configurations per test.
6+
*/
7+
declare let mockInputs: Record<string, string>;
8+
declare let mockMultilineInputs: Record<string, string[]>;
9+
declare let mockOutputs: Record<string, string>;
10+
declare let mockFailed: string[];
11+
declare let mockWarnings: string[];
12+
declare let mockGlobFiles: string[];
13+
declare let mockArtifactResults: any[];
14+
declare let mockVerifyCommitsResult: any[];
15+
declare const mockVerifyCommits: jest.Mock<any, any, any>;
16+
declare const mockEnsureAuthsInstalled: jest.Mock<any, any, any>;
17+
declare const mockVerifyArtifact: jest.Mock<any, any, any>;
18+
declare const mockRunPreflightChecks: jest.Mock<any, any, any>;
19+
declare function resetMockState(): void;
20+
declare function runMain(): Promise<void>;

0 commit comments

Comments
 (0)