From f63b7834ac3353b89ccdfcb07dfc906249807c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulises=20Gasc=C3=B3n?= Date: Sat, 18 Jan 2025 21:29:58 +0100 Subject: [PATCH] ci: migrate to GitHub Actions (#66) Migration from Travis to GitHub Actions (c2a3c82), also engine versions are now updated with a known limitations (#67, #68 and #69). Also replace build sticker in the `README.md` --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 10 -------- readme.md | 2 +- 3 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..81fffae --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +permissions: + contents: read + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + # TODO: Include Node@22 and Node@23 when https://github.com/yeoman/yo/issues/842 is resolved + # TODO: Include Node@19, Node@20, Node@21 when https://github.com/yeoman/doctor/issues/67 is resolved + # TODO: Include windows-latest when https://github.com/yeoman/doctor/issues/69 is resolved + matrix: + os: [ubuntu-latest, macos-latest] + node: [12, 13, 14, 15, 16, 17, 18] + # Avoid Error: Unable to find Node versions for platform darwin and architecture arm64: + exclude: + - os: macos-latest + node: 12 + - os: macos-latest + node: 13 + - os: macos-latest + node: 14 + - os: macos-latest + node: 15 + + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Setup Node.js + uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 + with: + node-version: ${{ matrix.node }} + + - name: Install dependencies + run: npm install + + - name: Install YO + run: npm install -g yo + + - name: Run tests + run: npm test \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 71a3482..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 16 - - 14 - - 12 -before_script: - - npm link - - yo-doctor -before_install: - - npm install -g yo@latest diff --git a/readme.md b/readme.md index 64d31ad..1684da1 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# Yeoman Doctor [![Build Status](https://travis-ci.org/yeoman/doctor.svg?branch=master)](https://travis-ci.org/yeoman/doctor) +# Yeoman Doctor [![CI](https://github.com/yeoman/doctor/actions/workflows/ci.yml/badge.svg)](https://github.com/yeoman/doctor/actions/workflows/ci.yml) > Detect potential issues with users system that could prevent Yeoman from working correctly