Skip to content

re: Fix argument name #14

re: Fix argument name

re: Fix argument name #14

Workflow file for this run

name: Test Build VBA (with Access Database)
on:
workflow_dispatch:
push:
branches:
- main
- dev*
paths-ignore:
- '**/README.md'
- '.devcontainer/**'
permissions:
id-token: write
attestations: write
jobs:
build:
runs-on: windows-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Build VBA-Enabled Documents (using own action)"
id: build_vba
uses: ./
with:
source-dir: "./tests_access" # Don't build anything, but include the setup part of the action
test-framework: "none"
office-app: "Access"
timeout-minutes: 20
- name: "Build Access Database (using msaccess-vcs-build action)"
id: build_access_file
uses: AccessCodeLib/msaccess-vcs-build@main
with:
source-dir: "./tests_access/source"
target-dir: "./tests_access/out"
compile: "false"
vcs-url: "https://api.github.com/repos/josef-poetzl/msaccess-vcs-addin/releases/tags/v4.1.2-build"
- name: "Rename Access Database"
id: rename_access_file
run: |
$sourceFile = "${{ github.workspace }}/tests_access/out/test.accdb"
$targetFile = "${{ github.workspace }}/tests_access/out/AccessDatabase.accdb"
if (Test-Path -Path $sourceFile) {
Rename-Item -Path $sourceFile -NewName $targetFile
} else {
Write-Host "Source file not found: $sourceFile"
}
- name: "Upload Build Artifact"
uses: actions/upload-artifact@v4
id: "upload"
with:
name: "VBA-Enabled-Documents"
path: "./tests_access/out/*"
if-no-files-found: warn
- name: "Take exiting screenshot"
if: always()
run: |
. "./scripts/utils/Screenshot.ps1"
# Create the directory if it does not exist
if (!(Test-Path -Path ${{ github.workspace }}/tests_access/screenshots)) {
New-Item -ItemType Directory -Path ${{ github.workspace }}/tests_access/screenshots
}
# Minimize PowerShell window
. "./scripts/utils/Minimize.ps1"
Minimize-Window "Administrator: C:\Program Files\PowerShell\7\pwsh.EXE"
Take-Screenshot -OutputPath ${{ github.workspace }}/tests_access/screenshots/ExitScreenshot.png
shell: pwsh
# TODO: Check if better method to visualize the screenshots: https://github.com/actions/upload-artifact/issues/14
- name: "Upload Screenshots"
# Run this step even if the build failed
if: always()
uses: actions/upload-artifact@v4
with:
name: "Screenshots"
path: "./tests_access/screenshots/*"
if-no-files-found: warn
- name: "Attestation"
uses: actions/attest-build-provenance@v2
with:
subject-name: "VBA-Enabled-Documents"
subject-digest: sha256:${{ steps.upload.outputs.artifact-digest }}