Skip to content

docs: add clarifai banner #50

docs: add clarifai banner

docs: add clarifai banner #50

Workflow file for this run

name: "Test Pull Request"
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
branch:
- ${{ github.head_ref }}
- "main"
permissions:
# Required to checkout the code
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: "Install Node"
uses: actions/setup-node@v4
with:
node-version: "20.11.0"
- name: "Install Deps"
run: npm ci
- name: "Lint"
run: npm run lint
- name: "Test"
run: npx vitest --coverage.enabled true
env:
VITE_CLARIFAI_USER_ID: ${{ secrets.VITE_CLARIFAI_USER_ID }}
VITE_CLARIFAI_PAT: ${{ secrets.VITE_CLARIFAI_PAT }}
- name: Prepare Branch Name
id: prepare
run: |
echo "CLEAN_BRANCH=$(echo '${{ matrix.branch }}' | sed 's/[":<>|*?\r\n\\\/]/-/g')" >> $GITHUB_ENV
- name: "Upload Coverage"
uses: actions/upload-artifact@v4
with:
name: coverage-${{ env.CLEAN_BRANCH }}
path: coverage
report-coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Prepare Branch Name
id: prepare
run: |
echo "CLEAN_BRANCH=$(echo '${{ github.head_ref }}' | sed 's/[":<>|*?\r\n\\\/]/-/g')" >> $GITHUB_ENV
- name: "Download Coverage Artifacts"
uses: actions/download-artifact@v4
with:
name: coverage-${{ env.CLEAN_BRANCH }}
path: coverage
- uses: actions/download-artifact@v4
with:
name: coverage-main
path: coverage-main
- name: "Report Coverage"
uses: davelosert/vitest-coverage-report-action@v2
with:
json-summary-compare-path: coverage-main/coverage-summary.json