diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8573356..4374ee2 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,41 +1,57 @@ name: Node.js CI -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] +on: [ + push, + pull_request +] jobs: build: runs-on: ${{ matrix.os }} + continue-on-error: true strategy: fail-fast: false matrix: os: [windows-latest] node-version: [ - 18.17.x, - 20.3.0, - 21.0.0 + 20.3.0 ] steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 + - name: Checkout + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v3 with: version: 8.15 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + + - name: Install Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: "pnpm" + + - name: Get pnpm store directory + shell: bash + run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v4 + 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 --frozen-lockfile + - name: Type checking - run: npm run lint + run: pnpm lint + - name: Test project - run: npm test + run: pnpm test env: TOKEN: ${{ secrets.TOKEN }} USER_ID: ${{ secrets.USERID }} diff --git a/package.json b/package.json index a7ddb95..6e41777 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Kayo Souza", "name": "insta-downloader", - "version": "3.3.0", + "version": "3.3.1", "description": "An application to download content from Instagram", "main": "src/index.js", "scripts": {