diff --git a/.github/workflows/nvda-chrome.yml b/.github/workflows/nvda-chrome.yml deleted file mode 100644 index 0cbc01e..0000000 --- a/.github/workflows/nvda-chrome.yml +++ /dev/null @@ -1,182 +0,0 @@ -# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: nvda-chrome -on: - workflow_dispatch: - inputs: - aria_at_ref: - description: | - The sha / ref to checkout for aria-at tests - required: false - type: string - test_pattern: - description: | - The test pattern passed to the aria-at-automation harness. - Uses a default of "{reference/**,test-*-nvda.*}" if not provided - required: false - type: string - work_dir: - description: | - The --plan-workingdir passed to the aria-at-automation harness. - Based from the aria-at repo build folder. - Uses a default of tests/alert if not provided. - required: false - type: string - callback_url: - description: | - The harness will send POST requests to this url using callback_header - header with test results. - required: false - type: string - status_url: - description: | - The harness will send POST requests to this url using callback_header - header with status updates. - required: false - type: string - callback_header: - description: | - The harness will send POST requests to callback_url using this header - with status updates. - required: false - type: string - - # seems if push is enabled, I'm not able to trigger via workflow_dispatch? - # push: - # branches: - # - nvda-chrome - -env: - ARIA_AT_WORK_DIR: ${{ inputs.work_dir || 'tests/alert' }} - ARIA_AT_TEST_PATTERN: ${{ inputs.test_pattern || '{reference/**,test-*-nvda.*}'}} - ARIA_AT_CALLBACK_URL: ${{ inputs.callback_url }} - ARIA_AT_STATUS_URL: ${{ inputs.status_url }} - ARIA_AT_CALLBACK_HEADER: ${{ inputs.callback_header || 'x-header-param:empty' }} - BROWSER: chrome - -jobs: - nvda-chrome: - runs-on: windows-2022 - steps: - - name: setup masks - shell: powershell - run: echo "::add-mask::$env:ARIA_AT_CALLBACK_HEADER" - - name: Log job state QUEUED - shell: powershell - if: inputs.status_url - run: | - $headerbits = $env:ARIA_AT_CALLBACK_HEADER -split ":\s*", 2 - $headers = @{$headerbits[0]=$headerbits[1]; "Content-Type" = "application/json"} - $body = @{'status'='QUEUED'; 'externalLogsUrl'="$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"} | ConvertTo-JSON - Invoke-WebRequest $env:ARIA_AT_STATUS_URL -Headers $headers -Method 'POST' -Body $body - - # Checkout all repos first (helps cache purposes) - - uses: actions/checkout@v3 - - - name: Checkout nvda-at-automation driver - uses: actions/checkout@v3 - with: - repository: "Prime-Access-Consulting/nvda-at-automation" - path: "nvda-at-automation" - - - name: Checkout aria-at ref ${{ inputs.aria_at_ref || 'master' }} - uses: actions/checkout@v3 - with: - repository: "w3c/aria-at" - path: "aria-at" - ref: ${{ inputs.aria_at_ref || 'master' }} - - - name: Checkout aria-at-automation-harness - uses: actions/checkout@v3 - with: - repository: "w3c/aria-at-automation-harness" - ref: "main" - path: "aria-at-automation-harness" - - - name: Use Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: "npm" - cache-dependency-path: "**/package-lock.json" - - uses: browser-actions/setup-chrome@v1 - with: - chrome-version: stable - id: setup-chrome - - run: | - echo "Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }} ${{ steps.setup-chrome.outputs.chrome-path }}" - # Installing Scream as a virtual audio driver to avoid exceptions later - - name: Install Scream (Virtual Audio Driver) - shell: powershell - run: | - Start-Service audio* - Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.6/Scream3.6.zip -OutFile C:\Scream3.6.zip - Expand-Archive -Path C:\Scream3.6.zip -DestinationPath C:\Scream - $cert = (Get-AuthenticodeSignature C:\Scream\Install\driver\Scream.sys).SignerCertificate - $store = [System.Security.Cryptography.X509Certificates.X509Store]::new("TrustedPublisher", "LocalMachine") - $store.Open("ReadWrite") - $store.Add($cert) - $store.Close() - cd C:\Scream\Install\driver - C:\Scream\Install\helpers\devcon install Scream.inf *Scream - - - uses: actions/setup-go@v4 - with: - cache-dependency-path: nvda-at-automation/Server/go.sum - - - name: Compile at-automation driver - shell: powershell - run: | - cd nvda-at-automation\Server - go build main\main.go - - - name: "aria-at: npm install" - shell: powershell - run: | - cd aria-at - npm install - - - name: "aria-at: npm run build" - shell: powershell - run: | - cd aria-at - npm run build - - - name: "automation-harness: npm install" - shell: powershell - run: | - cd aria-at-automation-harness - npm install - - - name: Log job state RUNNING - shell: powershell - if: inputs.status_url - run: | - $headerbits = $env:ARIA_AT_CALLBACK_HEADER -split ":\s*", 2 - $headers = @{$headerbits[0]=$headerbits[1]; "Content-Type" = "application/json"} - $body = @{'status'='RUNNING'; 'externalLogsUrl'="$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"; 'work_dir'="$env:ARIA_AT_WORK_DIR"} | ConvertTo-JSON - Invoke-WebRequest $env:ARIA_AT_STATUS_URL -Headers $headers -Method 'POST' -Body $body - - - name: Run harness - shell: powershell - continue-on-error: true - run: | - & .\run-tester.ps1 - - - name: Log job state COMPLETED - shell: powershell - if: inputs.status_url - run: | - $headerbits = $env:ARIA_AT_CALLBACK_HEADER -split ":\s*", 2 - $headers = @{$headerbits[0]=$headerbits[1]; "Content-Type" = "application/json"} - $body = @{'status'='COMPLETED'; 'externalLogsUrl'="$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"} | ConvertTo-JSON - Invoke-WebRequest $env:ARIA_AT_STATUS_URL -Headers $headers -Method 'POST' -Body $body - - - name: upload *.{log,png} - uses: actions/upload-artifact@v3 - with: - name: logs - path: | - D:\a\aria-at-gh-actions-helper\aria-at-gh-actions-helper\*.log - D:\a\aria-at-gh-actions-helper\aria-at-gh-actions-helper\*.png