From 73ff5c83c6f8f6b686da07485dcc122209b5c5df Mon Sep 17 00:00:00 2001 From: srnovus Date: Wed, 30 Oct 2024 14:42:01 -0600 Subject: [PATCH] udpate ci --- .github/workflows/ci.yml | 68 ++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d604cb..11beb1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,19 @@ -name: Test (production install and build) +name: Test (fedired.js) on: push: - branches: - - master - - develop + branches: [ develop ] + paths: + - packages/fedired-js/** + - .github/workflows/ci.yml pull_request: - -env: - NODE_ENV: production - + branches: [ develop ] + paths: + - packages/fedired-js/** + - .github/workflows/ci.yml jobs: - production: + test: + runs-on: ubuntu-latest strategy: @@ -19,21 +21,33 @@ jobs: node-version: [20.16.0] steps: - - uses: actions/checkout@v4.1.1 - with: - submodules: true - - name: Install pnpm - uses: pnpm/action-setup@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4.0.4 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - run: corepack enable - - run: pnpm i --no-frozen-lockfile # Cambiado aquĆ­ - - name: Check pnpm-lock.yaml - run: git diff --exit-code pnpm-lock.yaml - - name: Copy Configure - run: cp .github/fedired/test.yml .config/default.yml - - name: Build - run: pnpm build + - name: Checkout + uses: actions/checkout@v4.1.1 + + - run: corepack enable + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + + - name: Install dependencies + run: pnpm i --frozen-lockfile + + - name: Check pnpm-lock.yaml + run: git diff --exit-code pnpm-lock.yaml + + - name: Build + run: pnpm --filter fedired-js build + + - name: Test + run: pnpm --filter fedired-js test + env: + CI: true + + - name: Upload Coverage + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./packages/fedired-js/coverage/coverage-final.json \ No newline at end of file