From 940d3e2a0cfd229e5f53f78e0fac1189b7f66c10 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 12 Mar 2024 14:15:48 +0300 Subject: [PATCH 1/3] ci: migrate on github actions --- .github/workflows/test.yml | 40 ++++++------- .travis.yml | 50 ---------------- README.md | 4 +- appveyor.yml | 26 -------- azure-pipelines-polling.yml | 79 ------------------------- azure-pipelines.yml | 115 ------------------------------------ 6 files changed, 18 insertions(+), 296 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml delete mode 100644 azure-pipelines-polling.yml delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5cb4bfc..ddbdb09 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,20 +12,14 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: 16.x - - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: ${{ runner.os }}-yarn- + node-version: lts/* + cache: "yarn" - run: yarn --frozen-lockfile - - uses: actions/cache@v1 + - uses: actions/cache@v4 with: path: .eslintcache key: lint-${{ env.GITHUB_SHA }} @@ -36,7 +30,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [10.x, 12.x, 14.x, 16.x, 17.x] + node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 21.x] polling: ["false", "200"] exclude: - os: macos-latest @@ -52,27 +46,27 @@ jobs: node-version: 16.x polling: "200" - os: macos-latest - node-version: 17.x + node-version: 18.x + polling: "200" + - os: macos-latest + node-version: 20.x + polling: "200" + - os: macos-latest + node-version: 21.x polling: "200" runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: ${{ runner.os }}-yarn- + cache: "yarn" - run: yarn --frozen-lockfile - run: yarn cover --report lcovonly env: WATCHPACK_POLLING: ${{ matrix.polling }} - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v4 with: flags: integration functionalities: gcov diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 844df7e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -sudo: false -dist: trusty -language: node_js - -stages: - - basic - - advanced - -matrix: - include: - - os: linux - node_js: "14" - stage: basic - - os: osx - node_js: "14" - env: WATCHPACK_RECURSIVE_WATCHER_LOGGING=1 - stage: basic - - os: osx - node_js: "14" - env: WATCHPACK_WATCHER_LIMIT=1 - stage: advanced - - os: linux - node_js: "14" - env: WATCHPACK_POLLING=200 - stage: advanced - - os: linux - node_js: "12" - stage: advanced - - os: linux - node_js: "12" - env: WATCHPACK_POLLING=200 - stage: advanced - - os: linux - node_js: "10" - stage: advanced - - os: linux - node_js: "10" - env: WATCHPACK_POLLING=200 - stage: advanced - - os: osx - node_js: "10" - stage: advanced - -script: - - yarn cover --report lcovonly - -after_success: - - cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose - - bash <(curl -s https://codecov.io/bash) -X gcov - - rm -rf ./coverage diff --git a/README.md b/README.md index 2924722..cd885fa 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ Wrapper library for directory and file watching. -[![Build Status][build-status]][build-status-url] -[![Build status][build-status-veyor]][build-status-veyor-url] -[![Test coverage][coveralls-image]][coveralls-url] +[![Test](https://github.com/webpack/watchpack/actions/workflows/test.yml/badge.svg)](https://github.com/webpack/watchpack/actions/workflows/test.yml) [![codecov][codecov]][codecov-url] [![downloads][downloads]][downloads-url] [![Github contributors][contributors]][contributors-url] diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index e1c1bfb..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,26 +0,0 @@ -# appveyor file -# http://www.appveyor.com/docs/appveyor-yml - -init: - - git config --global core.autocrlf input - -cache: - - "..\\.yarn-cache" - -# what combinations to test -environment: - matrix: - - nodejs_version: 14 - - nodejs_version: 12 - - nodejs_version: 10 - -install: - - ps: Install-Product node $env:nodejs_version x64 - - yarn --preferred-cache-folder ..\\.yarn-cache - -build: off - -test_script: - - node --version - - yarn --version - - cmd: yarn test diff --git a/azure-pipelines-polling.yml b/azure-pipelines-polling.yml deleted file mode 100644 index 7a29b6a..0000000 --- a/azure-pipelines-polling.yml +++ /dev/null @@ -1,79 +0,0 @@ -jobs: - - job: Linux - pool: - vmImage: ubuntu-latest - strategy: - maxParallel: 3 - matrix: - node-15: - node_version: ^15.0.0 - node-14: - node_version: ^14.15.0 - node-12: - node_version: ^12.4.0 - node-10: - node_version: ^10.10.0 - steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: "Install Node.js $(node_version)" - - script: | - curl -o- -L https://yarnpkg.com/install.sh | bash - displayName: "Install Yarn" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - node -v - yarn -v - displayName: "Print versions" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - yarn - displayName: "Install dependencies" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - yarn cover --report lcovonly - env: - WATCHPACK_POLLING: 200 - displayName: "Run tests with coverage" - - - job: Windows - pool: - vmImage: windows-latest - strategy: - maxParallel: 3 - matrix: - node-15: - node_version: ^15.0.0 - node-14: - node_version: ^14.15.0 - node-12: - node_version: ^12.4.0 - node-10: - node_version: ^10.10.0 - steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: "Install Node.js $(node_version)" - - script: | - npm install --global yarn - displayName: "Install Yarn" - - script: | - set -e - node -v - yarn -v - displayName: "Print versions" - - script: | - set -e - yarn - displayName: "Install dependencies" - - script: | - set -e - yarn cover --report lcovonly - env: - WATCHPACK_POLLING: 200 - displayName: "Run tests with coverage" diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ce0bf1a..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,115 +0,0 @@ -jobs: - - job: Linux - pool: - vmImage: ubuntu-latest - strategy: - maxParallel: 3 - matrix: - node-15: - node_version: ^15.0.0 - node-14: - node_version: ^14.15.0 - node-12: - node_version: ^12.4.0 - node-10: - node_version: ^10.13.0 - steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: "Install Node.js $(node_version)" - - script: | - curl -o- -L https://yarnpkg.com/install.sh | bash - displayName: "Install Yarn" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - node -v - yarn -v - displayName: "Print versions" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - yarn - displayName: "Install dependencies" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - yarn cover --report lcovonly - displayName: "Run tests with coverage" - - - job: macOS - pool: - vmImage: macOS-latest - strategy: - maxParallel: 3 - matrix: - node-15: - node_version: ^15.0.0 - node-14: - node_version: ^14.15.0 - node-12: - node_version: ^12.4.0 - node-10: - node_version: ^10.13.0 - steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: "Install Node.js $(node_version)" - - script: | - curl -o- -L https://yarnpkg.com/install.sh | bash - displayName: "Install Yarn" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - node -v - yarn -v - displayName: "Print versions" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - yarn - displayName: "Install dependencies" - - script: | - set -e - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" - export WATCHPACK_RECURSIVE_WATCHER_LOGGING=1 - yarn cover --report lcovonly - displayName: "Run tests with coverage" - - - job: Windows - pool: - vmImage: windows-latest - strategy: - maxParallel: 3 - matrix: - node-15: - node_version: ^15.0.0 - node-14: - node_version: ^14.15.0 - node-12: - node_version: ^12.4.0 - node-10: - node_version: ^10.13.0 - steps: - - task: NodeTool@0 - inputs: - versionSpec: $(node_version) - displayName: "Install Node.js $(node_version)" - - script: | - npm install --global yarn - displayName: "Install Yarn" - - script: | - set -e - node -v - yarn -v - displayName: "Print versions" - - script: | - set -e - yarn - displayName: "Install dependencies" - - script: | - set -e - yarn cover --report lcovonly - displayName: "Run tests with coverage" From fd374751e5e5daaba0ea3df794cb799a521808f4 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 12 Mar 2024 14:30:38 +0300 Subject: [PATCH 2/3] ci: fix codecov token --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ddbdb09..f33d7b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,3 +70,4 @@ jobs: with: flags: integration functionalities: gcov + token: ${{ secrets.CODECOV_TOKEN }} From 72f216e0f9dfd75a01b0e85fe1f40f9613f8d119 Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Tue, 12 Mar 2024 14:42:45 +0300 Subject: [PATCH 3/3] docs: update readme --- README.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index cd885fa..ef1f851 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,8 @@ Wrapper library for directory and file watching. [![Test](https://github.com/webpack/watchpack/actions/workflows/test.yml/badge.svg)](https://github.com/webpack/watchpack/actions/workflows/test.yml) -[![codecov][codecov]][codecov-url] -[![downloads][downloads]][downloads-url] -[![Github contributors][contributors]][contributors-url] +[![Codecov](https://codecov.io/gh/webpack/watchpack/graph/badge.svg?token=8xk2OrrxWm)](https://codecov.io/gh/webpack/watchpack) +[![Downloads](https://img.shields.io/npm/dm/watchpack.svg)]](https://www.npmjs.com/package/watchpack) ## Concept @@ -132,16 +131,3 @@ var fileTimes = wp.getTimes(); // this include timestamps from files not directly watched // key: absolute path, value: timestamp as number ``` - -[build-status]: https://travis-ci.org/webpack/watchpack.svg?branch=main -[build-status-url]: https://travis-ci.org/webpack/watchpack -[build-status-veyor]: https://ci.appveyor.com/api/projects/status/e5u2qvmugtv0r647/branch/main?svg=true -[build-status-veyor-url]: https://ci.appveyor.com/project/sokra/watchpack/branch/main -[coveralls-url]: https://coveralls.io/r/webpack/watchpack/ -[coveralls-image]: https://img.shields.io/coveralls/webpack/watchpack.svg -[codecov]: https://codecov.io/gh/webpack/watchpack/branch/main/graph/badge.svg -[codecov-url]: https://codecov.io/gh/webpack/watchpack -[downloads]: https://img.shields.io/npm/dm/watchpack.svg -[downloads-url]: https://www.npmjs.com/package/watchpack -[contributors]: https://img.shields.io/github/contributors/webpack/watchpack.svg -[contributors-url]: https://github.com/webpack/watchpack/graphs/contributors