mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
Allow TestDriver to run on outside contributions (#1622)
This commit is contained in:
parent
c1cf5396bf
commit
0f1d138f0e
2
.github/workflows/merge-gatekeeper.yml
vendored
2
.github/workflows/merge-gatekeeper.yml
vendored
@ -23,4 +23,4 @@ jobs:
|
||||
uses: upsidr/merge-gatekeeper@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
ignored: Test Onboarding, Analyze (go), Analyze (javascript-typescript), License Compliance, CodeRabbit
|
||||
ignored: Build for TestDriver.ai, Analyze (go), Analyze (javascript-typescript), License Compliance, CodeRabbit
|
||||
|
74
.github/workflows/testdriver-build.yml
vendored
Normal file
74
.github/workflows/testdriver-build.yml
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
name: TestDriver.ai Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+*"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- ".storybook/**"
|
||||
- ".vscode/**"
|
||||
- ".editorconfig"
|
||||
- ".gitignore"
|
||||
- ".prettierrc"
|
||||
- ".eslintrc.js"
|
||||
- "**/*.md"
|
||||
schedule:
|
||||
- cron: 0 21 * * *
|
||||
workflow_dispatch: null
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.23"
|
||||
NODE_VERSION: 22
|
||||
|
||||
permissions:
|
||||
contents: read # To allow the action to read repository contents
|
||||
pull-requests: write # To allow the action to create/update pull request comments
|
||||
|
||||
jobs:
|
||||
build_and_upload:
|
||||
name: Build for TestDriver.ai
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# General build dependencies
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{env.GO_VERSION}}
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{env.NODE_VERSION}}
|
||||
- name: Install Yarn
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
command: |
|
||||
corepack enable
|
||||
yarn install
|
||||
timeout_minutes: 5
|
||||
max_attempts: 3
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
run: task package
|
||||
env:
|
||||
USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one.
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: false # disable codesign
|
||||
shell: powershell # electron-builder's Windows code signing package has some compatibility issues with pwsh, so we need to use Windows Powershell
|
||||
|
||||
# Upload .exe as an artifact
|
||||
- name: Upload .exe artifact
|
||||
id: upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-exe
|
||||
path: make/*.exe
|
72
.github/workflows/testdriver.yml
vendored
72
.github/workflows/testdriver.yml
vendored
@ -1,26 +1,10 @@
|
||||
name: TestDriver.ai
|
||||
name: TestDriver.ai Run
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+*"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- ".storybook/**"
|
||||
- ".vscode/**"
|
||||
- ".editorconfig"
|
||||
- ".gitignore"
|
||||
- ".prettierrc"
|
||||
- ".eslintrc.js"
|
||||
- "**/*.md"
|
||||
schedule:
|
||||
- cron: 0 21 * * *
|
||||
workflow_dispatch: null
|
||||
workflow_run:
|
||||
workflows: ["TestDriver.ai Build"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.23"
|
||||
@ -31,50 +15,10 @@ permissions:
|
||||
pull-requests: write # To allow the action to create/update pull request comments
|
||||
|
||||
jobs:
|
||||
build_and_upload:
|
||||
name: Test Onboarding
|
||||
run_testdriver:
|
||||
name: Run TestDriver.ai
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# General build dependencies
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{env.GO_VERSION}}
|
||||
cache-dependency-path: |
|
||||
go.sum
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{env.NODE_VERSION}}
|
||||
- name: Install Yarn
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
command: |
|
||||
corepack enable
|
||||
yarn install
|
||||
timeout_minutes: 5
|
||||
max_attempts: 3
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
run: task package
|
||||
env:
|
||||
USE_SYSTEM_FPM: true # Ensure that the installed version of FPM is used rather than the bundled one.
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: false # disable codesign
|
||||
shell: powershell # electron-builder's Windows code signing package has some compatibility issues with pwsh, so we need to use Windows Powershell
|
||||
|
||||
# Upload .exe as an artifact
|
||||
- name: Upload .exe artifact
|
||||
id: upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-exe
|
||||
path: make/*.exe
|
||||
|
||||
- uses: testdriverai/action@main
|
||||
id: testdriver
|
||||
env:
|
||||
@ -102,7 +46,7 @@ jobs:
|
||||
|
||||
# Fetch the artifact upload URL
|
||||
Write-Host "Fetching the artifact upload URL..."
|
||||
$artifactUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" -Headers $headers).artifacts[0].archive_download_url
|
||||
$artifactUrl = (Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/artifacts" -Headers $headers).artifacts[0].archive_download_url
|
||||
|
||||
if ($artifactUrl) {
|
||||
Write-Host "Artifact URL successfully fetched: $artifactUrl"
|
||||
|
Loading…
Reference in New Issue
Block a user