1
+ name : Test Build VBA
2
+ on :
3
+ workflow_dispatch :
4
+ push :
5
+ branches :
6
+ - main
7
+ - dev*
8
+ paths-ignore :
9
+ - ' **/README.md'
10
+ - ' .devcontainer/**'
11
+
12
+ permissions :
13
+ id-token : write
14
+ attestations : write
15
+
16
+ jobs :
17
+ build :
18
+ runs-on : windows-latest
19
+ steps :
20
+ - name : " Checkout"
21
+ uses : actions/checkout@v4
22
+ - name : " Build VBA-Enabled Documents (using own action)"
23
+ id : build_vba
24
+ uses : ./
25
+ with :
26
+ source-dir : " ./" # Don't build anything, but include the setup part of the action
27
+ test-framework : " none"
28
+ timeout-minutes : 20
29
+ - name : " Build Access Database (using msaccess-vcs-build action)"
30
+ id : build_access_file
31
+ uses : AccessCodeLib/msaccess-vcs-build@main
32
+ with :
33
+ source-dir : " ./tests/AccessDatabase.accde"
34
+ target-dir : " ./tests/out"
35
+ compile : " false"
36
+ vcs-url : " https://api.github.com/repos/josef-poetzl/msaccess-vcs-addin/releases/tags/v4.1.2-build"
37
+ - name : " Upload Build Artifact"
38
+ uses : actions/upload-artifact@v4
39
+ id : " upload"
40
+ with :
41
+ name : " VBA-Enabled-Documents"
42
+ path : " ./tests/out/*"
43
+ if-no-files-found : warn
44
+ - name : " Take exiting screenshot"
45
+ if : always()
46
+ run : |
47
+ . "./scripts/utils/Screenshot.ps1"
48
+ # Create the directory if it does not exist
49
+ if (!(Test-Path -Path ${{ github.workspace }}/tests/screenshots)) {
50
+ New-Item -ItemType Directory -Path ${{ github.workspace }}/tests/screenshots
51
+ }
52
+ # Minimize PowerShell window
53
+ . "./scripts/utils/Minimize.ps1"
54
+ Minimize-Window "Administrator: C:\Program Files\PowerShell\7\pwsh.EXE"
55
+ Take-Screenshot -OutputPath ${{ github.workspace }}/tests/screenshots/ExitScreenshot.png
56
+ shell : pwsh
57
+ # TODO: Check if better method to visualize the screenshots: https://github.com/actions/upload-artifact/issues/14
58
+ - name : " Upload Screenshots"
59
+ # Run this step even if the build failed
60
+ if : always()
61
+ uses : actions/upload-artifact@v4
62
+ with :
63
+ name : " Screenshots"
64
+ path : " ./tests/screenshots/*"
65
+ if-no-files-found : warn
66
+ - name : " Attestation"
67
+ uses : actions/attest-build-provenance@v2
68
+ with :
69
+ subject-name : " VBA-Enabled-Documents"
70
+ subject-digest : sha256:${{ steps.upload.outputs.artifact-digest }}
0 commit comments