here goes nothin #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TestDriver.ai | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
gather-markdown-files: | ||
name: Gather Markdown Files | ||
runs-on: ubuntu-latest | ||
outputs: | ||
markdown_files: ${{ steps.markdown_list.outputs.files }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Find all markdown files | ||
id: markdown_list | ||
run: | | ||
FILES=$(ls ./testdriver/.generate/*.md) | ||
FILES_JSON=$(echo "$FILES" | jq -R -s -c 'split("\n")[:-1]') | ||
echo "::set-output name=files::$FILES_JSON" | ||
test: | ||
needs: gather-markdown-files | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
markdown: ${{ fromJson(needs.gather-markdown-files.outputs.markdown_files) }} | ||
name: TestDriver - ${{ steps.extract_filename.outputs.file_name }} # Dynamically set the job name using the file name | ||
Check failure on line 32 in .github/workflows/testdriver.yml GitHub Actions / TestDriver.aiInvalid workflow file
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Extract file name | ||
id: extract_filename | ||
run: | | ||
FILE_NAME=$(basename "${{ matrix.markdown }}" .md) | ||
echo "::set-output name=file_name::$FILE_NAME" | ||
- name: Display job name | ||
run: | | ||
echo "Running job for file: ${{ steps.extract_filename.outputs.file_name }}" | ||
- uses: testdriverai/action@main | ||
name: "TestDriver - ${{ steps.extract_filename.outputs.file_name }}" # Dynamically set the job name here | ||
with: | ||
key: ${{ secrets.TESTDRIVER_API_KEY }} | ||
prompt: | | ||
$(cat "${{ matrix.markdown }}") | ||
prerun: | | ||
cd $env:TEMP | ||
npm init -y | ||
npm install dashcam-chrome | ||
Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized", "--load-extension=$(pwd)/node_modules/dashcam-chrome/build", "${{ env.WEBSITE_URL }}" | ||
exit | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
FORCE_COLOR: "3" | ||
WEBSITE_URL: "https://example.com" |