Skip to content

Commit

Permalink
here goes nothin
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjennings committed Sep 10, 2024
1 parent 686c71b commit 6548e56
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/testdriver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ jobs:
run: |
FILES=$(ls ./testdriver/.generate/*.md)
FILES_JSON=$(echo "$FILES" | jq -R -s -c 'split("\n")[:-1]')
echo "files=$FILES_JSON" >> $GITHUB_ENV
echo "::set-output name=files::$FILES_JSON"
test:
needs: gather-markdown-files
name: "TestDriver - ${{ matrix.file_name }}"
name: "TestDriver - ${{ matrix.markdown }}"
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -37,19 +38,29 @@ jobs:
- name: Extract file name
id: extract_filename
run: |
FILE_NAME=$(basename ${{ matrix.markdown }} .md)
FILE_NAME=$(basename "${{ matrix.markdown }}" .md)
echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
echo "File Name: $FILE_NAME"
- name: "Read markdown content"
- name: "Read markdown content and encode it"
id: encode_content
run: |
MARKDOWN_FILE=${{ matrix.markdown }}
echo "MARKDOWN_CONTENT=$(cat $MARKDOWN_FILE)" >> $GITHUB_ENV
MARKDOWN_CONTENT=$(cat "$MARKDOWN_FILE" | base64)
echo "MARKDOWN_CONTENT=$MARKDOWN_CONTENT" >> $GITHUB_ENV
echo "Markdown content encoded."
- name: Decode markdown content for prompt
id: decode_content
run: |
DECODED_MARKDOWN_CONTENT=$(echo "$MARKDOWN_CONTENT" | base64 --decode)
echo "DECODED_MARKDOWN_CONTENT=$DECODED_MARKDOWN_CONTENT" >> $GITHUB_ENV
echo "Decoded markdown content: $DECODED_MARKDOWN_CONTENT"
- uses: testdriverai/action@main
with:
key: ${{ secrets.TESTDRIVER_API_KEY }}
prompt: |
${{ env.MARKDOWN_CONTENT }}
prompt: ${{ env.DECODED_MARKDOWN_CONTENT }}
prerun: |
cd $env:TEMP
npm init -y
Expand Down

0 comments on commit 6548e56

Please sign in to comment.