diff --git a/.github/workflows/node-tests-only.yml b/.github/workflows/node-tests-only.yml new file mode 100644 index 0000000000..80c5fbedee --- /dev/null +++ b/.github/workflows/node-tests-only.yml @@ -0,0 +1,55 @@ +name: Node.js tests-only + +on: + [push, pull_request] + +jobs: + testonly: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + node_version: [14, 12, 10, 8, 6, 4] + eslint_version: [5, 4, 3, 2] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup NVM + run: | + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash + + - name: Setup Node.js ${{ matrix.node_version }} + run: | + source ~/.nvm/nvm.sh + nvm install ${{ matrix.node_version }} + + - name: Install latest npm for given node version + run: | + source ~/.nvm/nvm.sh + nvm install-latest-npm + + - name: Install npm dependencies + env: + ESLINT_VERSION: ${{ matrix.eslint_version }} + run: | + NPM_CONFIG_LEGACY_PEER_DEPS=true npm install + npm run copy-metafiles + + - name: Install specific eslint version + if: ${{ matrix.eslint_version != null }} + env: + ESLINT_VERSION: ${{ matrix.eslint_version }} + run: | + NPM_CONFIG_LEGACY_PEER_DEPS=true npm install + ./tests/dep-time-travel.sh + npm run pretest + + - name: Run tests + run: npm run tests-only + + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v4 + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 21a7070fb7..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -language: node_js - -# osx backlog is often deep, so to be polite we can just hit these highlights -matrix: - include: - - os: osx - env: ESLINT_VERSION=5 - node_js: 14 - - os: osx - env: ESLINT_VERSION=5 - node_js: 12 - - os: osx - env: ESLINT_VERSION=5 - node_js: 10 - - os: osx - env: ESLINT_VERSION=4 - node_js: 8 - - os: osx - env: ESLINT_VERSION=3 - node_js: 6 - - os: osx - env: ESLINT_VERSION=2 - node_js: 4 - - fast_finish: true - -before_install: - - 'nvm install-latest-npm' - - 'NPM_CONFIG_LEGACY_PEER_DEPS=true npm install' - - 'npm run copy-metafiles' -install: - - 'NPM_CONFIG_LEGACY_PEER_DEPS=true npm install' - - 'if [ -n "${ESLINT_VERSION}" ]; then ./tests/dep-time-travel.sh; fi' - - 'npm run pretest' - -script: - - npm run tests-only - -after_success: - - bash <(curl -Os https://uploader.codecov.io/latest/linux/codecov)