From 843f337ad7f4c5c4b695aa8f1faece5fcfed6a40 Mon Sep 17 00:00:00 2001 From: Toru Nagashima Date: Sat, 16 May 2020 19:28:05 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9A=92=20switch=20CI=20to=20GitHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .azure-pipelines/lint-job.yml | 16 ------- .azure-pipelines/test-job.yml | 30 ------------- .azure-pipelines/website-job.yml | 21 --------- .github/workflows/CI.yml | 77 ++++++++++++++++++++++++++++++++ .github/workflows/Website.yml | 23 ++++++++++ README.md | 2 +- azure-pipelines.yml | 65 --------------------------- docs/README.md | 2 +- 8 files changed, 102 insertions(+), 134 deletions(-) delete mode 100644 .azure-pipelines/lint-job.yml delete mode 100644 .azure-pipelines/test-job.yml delete mode 100644 .azure-pipelines/website-job.yml create mode 100644 .github/workflows/CI.yml create mode 100644 .github/workflows/Website.yml delete mode 100644 azure-pipelines.yml diff --git a/.azure-pipelines/lint-job.yml b/.azure-pipelines/lint-job.yml deleted file mode 100644 index 08221c3..0000000 --- a/.azure-pipelines/lint-job.yml +++ /dev/null @@ -1,16 +0,0 @@ -jobs: - - job: lint - displayName: Lint - pool: - vmImage: Ubuntu-16.04 - steps: - - task: NodeTool@0 - displayName: Install Node.js - inputs: - versionSpec: 12.x - - - script: npm install - displayName: Install Packages - - - script: npm run -s lint - displayName: Lint diff --git a/.azure-pipelines/test-job.yml b/.azure-pipelines/test-job.yml deleted file mode 100644 index e806f4f..0000000 --- a/.azure-pipelines/test-job.yml +++ /dev/null @@ -1,30 +0,0 @@ -parameters: - name: "" - displayName: "" - vmImage: "" - nodeVersion: "" - eslintVersion: "" - -jobs: - - job: ${{parameters.name}} - displayName: ${{parameters.displayName}} - pool: - vmImage: ${{parameters.vmImage}} - steps: - - task: NodeTool@0 - displayName: Install Node.js - inputs: - versionSpec: ${{parameters.nodeVersion}} - - - script: npm install - displayName: Install Packages - - - script: npm install --no-save eslint@${{parameters.eslintVersion}} - displayName: Install Specific ESLint - condition: ne('${{parameters.eslintVersion}}', '') - - - script: npm run -s test:ci - displayName: Test - - - script: npm run -s codecov -- -t $(CODECOV_TOKEN) - displayName: Send Coverage diff --git a/.azure-pipelines/website-job.yml b/.azure-pipelines/website-job.yml deleted file mode 100644 index fc88950..0000000 --- a/.azure-pipelines/website-job.yml +++ /dev/null @@ -1,21 +0,0 @@ -jobs: - - job: website - displayName: Build Website - pool: - vmImage: Ubuntu-16.04 - condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - steps: - - task: NodeTool@0 - displayName: Install Node.js - inputs: - versionSpec: 12.x - - - script: npm install - displayName: Install Packages - - - script: npm run -s docs:build - displayName: Build Website - - - script: npm run -s docs:deploy -- $(GH_TOKEN) - displayName: Deploy - condition: succeeded() diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..8bac010 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,77 @@ +name: CI +on: + push: + branches: [master, gha] + pull_request: + branches: [master] + schedule: + - cron: 0 0 * * 0 + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Node.js + uses: actions/setup-node@v1 + with: { node-version: 14.x } + - name: Install Packages + run: npm install + - name: Lint + run: npm run -s lint + + test: + name: Test + strategy: + matrix: + eslint: [7.x] + node: [14.x] + os: [ubuntu-latest] + include: + # On other platforms + - eslint: 7.x + node: 14.x + os: windows-latest + - eslint: 7.x + node: 14.x + os: macos-latest + # On old Node.js versions + - eslint: 7.x + node: 12.x + os: ubuntu-latest + - eslint: 7.x + node: 10.x + os: ubuntu-latest + - eslint: 6.x + node: 8.x + os: ubuntu-latest + - eslint: 5.x + node: 6.x + os: ubuntu-latest + # On the minimum supported ESLint/Node.js version + - eslint: "4.19.1" + node: "6.5.0" + os: ubuntu-latest + + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Node.js ${{ matrix.node }} + uses: actions/setup-node@v1 + with: { node-version: "${{ matrix.node }}" } + - name: Install npm 6.x + run: npm install --global npm@6.x + if: ${{ matrix.node == '6.x' || matrix.node == '6.5.0' }} + - name: Install Packages + run: npm install + - name: Install ESLint ${{ matrix.eslint }} + run: npm install --no-save eslint@${{ matrix.eslint }} + - name: Test + run: npm run -s test:ci + - name: Send Coverage + run: npm run -s codecov + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/Website.yml b/.github/workflows/Website.yml new file mode 100644 index 0000000..1887113 --- /dev/null +++ b/.github/workflows/Website.yml @@ -0,0 +1,23 @@ +name: Website +on: + push: + branches: [master] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Node.js + uses: actions/setup-node@v1 + with: { node-version: 14.x } + - name: Install Packages + run: npm install + - name: Build Website + run: npm run -s docs:build + - name: Deploy Website + run: npm run -s docs:deploy -- $GITHUB_TOKEN + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 1d512aa..db67999 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![npm version](https://img.shields.io/npm/v/eslint-plugin-eslint-comments.svg)](https://www.npmjs.com/package/eslint-plugin-eslint-comments) [![Downloads/month](https://img.shields.io/npm/dm/eslint-plugin-eslint-comments.svg)](http://www.npmtrends.com/eslint-plugin-eslint-comments) -[![Build Status](https://dev.azure.com/mysticatea/eslint-plugin-eslint-comments/_apis/build/status/continuous-integration?branchName=master)](https://dev.azure.com/mysticatea/eslint-plugin-eslint-comments/_build/latest?definitionId=2&branchName=master) +[![Build Status](https://github.com/mysticatea/eslint-plugin-eslint-comments/workflows/CI/badge.svg)](https://github.com/mysticatea/eslint-plugin-eslint-comments/actions) [![codecov](https://codecov.io/gh/mysticatea/eslint-plugin-eslint-comments/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/eslint-plugin-eslint-comments) [![Dependency Status](https://david-dm.org/mysticatea/eslint-plugin-eslint-comments.svg)](https://david-dm.org/mysticatea/eslint-plugin-eslint-comments) diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index a84ac90..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,65 +0,0 @@ -trigger: - - master - -jobs: - - template: .azure-pipelines/lint-job.yml - - - template: .azure-pipelines/test-job.yml - parameters: - name: test_on_linux_node12_eslint5 - displayName: Test on Node 12, ESLint 5, Linux - vmImage: Ubuntu-16.04 - nodeVersion: 12.x - - - template: .azure-pipelines/test-job.yml - parameters: - name: test_on_linux_node10_eslint5 - displayName: Test on Node 10, ESLint 5, Linux - vmImage: Ubuntu-16.04 - nodeVersion: 10.x - - - template: .azure-pipelines/test-job.yml - parameters: - name: test_on_linux_node8_eslint5 - displayName: Test on Node 8, ESLint 5, Linux - vmImage: Ubuntu-16.04 - nodeVersion: 8.x - - - template: .azure-pipelines/test-job.yml - parameters: - name: test_on_linux_node6_eslint5 - displayName: Test on Node 6, ESLint 5, Linux - vmImage: Ubuntu-16.04 - nodeVersion: 6.x - - - template: .azure-pipelines/test-job.yml - parameters: - name: test_on_linux_node12_eslint4 - displayName: Test on Node 12, ESLint 4, Linux - vmImage: Ubuntu-16.04 - nodeVersion: 12.x - eslintVersion: 4.x - - - template: .azure-pipelines/test-job.yml - parameters: - name: test_on_linux_node12_eslint6rc - displayName: Test on Node 12, ESLint 6 RC, Linux - vmImage: Ubuntu-16.04 - nodeVersion: 12.x - eslintVersion: ^6.0.0-rc.0 - - - template: .azure-pipelines/test-job.yml - parameters: - name: test_on_windows_node12_eslint5 - displayName: Test on Node 12, ESLint 5, Windows - vmImage: Windows-2019 - nodeVersion: 12.x - - - template: .azure-pipelines/test-job.yml - parameters: - name: test_on_macos_node12_eslint5 - displayName: Test on Node 12, ESLint 5, macOS - vmImage: macOS-10.14 - nodeVersion: 12.x - - - template: .azure-pipelines/website-job.yml diff --git a/docs/README.md b/docs/README.md index 3ce0cad..78d35b1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2,7 +2,7 @@ [![npm version](https://img.shields.io/npm/v/eslint-plugin-eslint-comments.svg)](https://www.npmjs.com/package/eslint-plugin-eslint-comments) [![Downloads/month](https://img.shields.io/npm/dm/eslint-plugin-eslint-comments.svg)](http://www.npmtrends.com/eslint-plugin-eslint-comments) -[![Build Status](https://dev.azure.com/mysticatea/eslint-plugin-eslint-comments/_apis/build/status/continuous-integration?branchName=master)](https://dev.azure.com/mysticatea/eslint-plugin-eslint-comments/_build/latest?definitionId=2&branchName=master) +[![Build Status](https://github.com/mysticatea/eslint-plugin-eslint-comments/workflows/CI/badge.svg)](https://github.com/mysticatea/eslint-plugin-eslint-comments/actions) [![codecov](https://codecov.io/gh/mysticatea/eslint-plugin-eslint-comments/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/eslint-plugin-eslint-comments) [![Dependency Status](https://david-dm.org/mysticatea/eslint-plugin-eslint-comments.svg)](https://david-dm.org/mysticatea/eslint-plugin-eslint-comments)