relative-ci / roadmap

Issues, questions and feature requests for RelativeCI
https://relative-ci.com
3 stars 0 forks source link

Relative CI stats not updated with Vite in the Github action #58

Closed okomarov closed 11 months ago

okomarov commented 11 months ago

We're using Vite and the following Github workflow:

name: frontend
on:
  push:
    paths:
      - "apps/app/**"
jobs:
  test:
    timeout-minutes: 15
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./apps/app

    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v2
        with:
          version: 8
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: "pnpm"
      - run: pnpm install --prefer-frozen-lockfile
      - name: Build with stats
        run: pnpm build

      - name: Send bundle stats to RelativeCI
        uses: relative-ci/agent-action@v2
        with:
          webpackStatsFile: apps/app/build/webpack-stats.json
          key: ${{ secrets.RELATIVE_CI_KEY }}
          token: ${{ secrets.GITHUB_TOKEN }}

where the build command is: "build": "tsc && vite build"

When I check the step in the Github workflow, the printed stats are actually up-to-date and so is the produced webpack-stats.json. The Relative CI agent however reports older stats.

image
vio commented 11 months ago

Hi @okomarov, thank you for creating the issue!

Your config looks ok, can you share what data appears to be older: a particular metric or the entire job?

Also, can you please send to support@relative-ci.com your project id/name?

okomarov commented 11 months ago

@vio Thanks, this I believe has now been solved as the issue was related to asset name normalisation and Rollup defaults, which changed with Vite 5 since they moved to Rollup v4. I'll let you add any details, if relevant.

Thanks again for the quick turnaround.