Skip to content

Commit

Permalink
chore(github-action): fix pipeline github
Browse files Browse the repository at this point in the history
  • Loading branch information
Seboran committed Aug 9, 2023
1 parent cc76d4f commit 1b9a295
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 92 deletions.
63 changes: 35 additions & 28 deletions .github/workflows/coverage.js.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
- push
- pull_request

jobs:
build:

cache-and-install:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm i
- run: pnpm run coverage
- name: Vitest Coverage Report
uses: davelosert/[email protected]


- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 7
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Run coverage
run: pnpm coverage
31 changes: 0 additions & 31 deletions .github/workflows/node.js.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/npm-publish.yml

This file was deleted.

0 comments on commit 1b9a295

Please sign in to comment.