Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find config file ".//". #259

Closed
productdevbook opened this issue Jul 28, 2023 · 2 comments · Fixed by #260
Closed

Unable to find config file ".//". #259

productdevbook opened this issue Jul 28, 2023 · 2 comments · Fixed by #260
Labels

Comments

@productdevbook
Copy link

productdevbook commented Jul 28, 2023

Error ci

Run davelosert/vitest-coverage-report-action@v2
  with:
    working-directory: ./
    github-token: ***
    json-summary-path: coverage/coverage-summary.json
    file-coverage-mode: changes
    json-final-path: coverage/coverage-final.json
Error: Failed to read vite config file".//" or any of the default locations.
Make sure you provide the vite-config-path option if you're using a non-default location or name of your config file.
Error: Error: Unable to find config file ".//".

My config

name: Main

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  pull-requests: write
  contents: read

on:
  push:
    branches:
      - main

  pull_request:
    branches:
      - main

jobs:
  build-test:

    name: 📚 Main
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ubuntu-latest]

    steps:
      - uses: actions/checkout@v3

      - name: Cache turbo build setup
        uses: actions/cache@v3
        with:
          path: .turbo
          key: ${{ runner.os }}-turbo-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-turbo-

      - run: corepack enable
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
          cache: pnpm

      - name: 📦 Install dependencies
        run: pnpm install --frozen-lockfile

      - name: 🧪 Server Test
        run: pnpm test:server
        env:
          VITE_TEST_DB_URL: postgres://postgres:postgres@127.0.0.1:5432

      - name: 🧪 Server Test Coverage
        run: pnpm test:server:cov
        env:
          VITE_TEST_DB_URL: postgres://postgres:postgres@127.0.0.1:5432

      - name: 📝 Upload coverage
        if: always()
        uses: davelosert/vitest-coverage-report-action@v2
        with:
          working-directory: './'
@davelosert
Copy link
Owner

Hi @productdevbook,

thank you for reporting this. The error message is a bit misleading - but it basically tells you that there wasn't a vite-config in the root-path of your repository. Right now, having a vite-config is required for this library to read the coverage-thresholds.

However, I realized that this action could also work fine without coverage-thresholds, and, as such, without a vite-config present. So I will change this to only be a warning and adjust the warning message to be more precise.

@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 2.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants