Run the qodo-cover action (Javascript) #1
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: Run the qodo-cover action (Javascript) | |
on: | |
workflow_dispatch: | |
inputs: | |
desired_coverage: | |
description: "Desired coverage percentage" | |
required: false | |
default: "70" | |
permissions: | |
pull-requests: write | |
contents: read | |
jobs: | |
run-qodo-cover-js: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
cache-dependency-path: templated_tests/javascript/calculator | |
- name: Install dependencies | |
run: | | |
npm install | |
working-directory: templated_tests/javascript/calculator | |
- name: Qodo Cover | |
uses: qodo-ai/qodo-ci/.github/actions/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
project_language: javascript | |
project_root: templated_tests/javascript/calculator | |
code_coverage_report_path: templated_tests/javascript/calculator/coverage/cobertura-coverage.xml | |
test_command: "npm run test -- tests/**/*.test.js" | |
model: gpt-4o | |
desired_coverage: ${{ github.event.inputs.desired_coverage }} | |
test_folder: tests | |
source_folder: src | |
branch: ${{ github.ref_name }} | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |