From 2b866fa355a8a6de62b4aaa28723e100a191ef7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=B9?= Date: Thu, 16 Apr 2020 15:26:54 +0900 Subject: [PATCH] ci: use GitHub Actions (#62) * ci(github-actions): add workflow * ci(travis): remove * ci(appveyor): remove * ci(doc): add actions & codecov badge to README.md --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ .npmignore | 1 - .ratignore | 1 - .travis.yml | 11 --------- README.md | 6 ++--- appveyor.yml | 18 -------------- 6 files changed, 54 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..cc1c1dd3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Node CI + +on: [push, pull_request] + +jobs: + test: + name: NodeJS ${{ matrix.node-version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + node-version: [10.x, 12.x] + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Environment Information + run: | + node --version + npm --version + + - name: npm install and test + run: npm cit + env: + CI: true + + - uses: codecov/codecov-action@v1 + with: + fail_ci_if_error: true diff --git a/.npmignore b/.npmignore index 62fc8e0c..ee8a59d1 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,3 @@ .* -appveyor.yml spec coverage diff --git a/.ratignore b/.ratignore index 7ba38886..79c6997b 100644 --- a/.ratignore +++ b/.ratignore @@ -1,2 +1 @@ -appveyor.yml spec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5bff8c1c..00000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -sudo: false -node_js: - - 10 - - 12 - -install: - - npm install - -script: - - npm test diff --git a/README.md b/README.md index 212f6193..b6c6a029 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ # --> -[![Build status](https://ci.appveyor.com/api/projects/status/a00hk739gm700dk4?svg=true)](https://ci.appveyor.com/project/Humbedooh/cordova-create) -[![Build Status](https://travis-ci.org/apache/cordova-create.svg?branch=master)](https://travis-ci.org/apache/cordova-create) - # cordova-create +[![Node CI](https://github.com/apache/cordova-create/workflows/Node%20CI/badge.svg?branch=master)](https://github.com/apache/cordova-create/actions?query=branch%3Amaster) +[![codecov.io](https://codecov.io/github/apache/cordova-create/coverage.svg?branch=master)](https://codecov.io/github/apache/cordova-create?branch=master) + This module is used for creating cordova style projects. It also incudes support for [cordova templates](http://cordova.apache.org/docs/en/latest/guide/cli/template.html). It can fetch templates from npm and git. ## Usage: diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index dc43cacd..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,18 +0,0 @@ -# appveyor file -# http://www.appveyor.com/docs/appveyor-yml - -environment: - matrix: - - nodejs_version: 10 - - nodejs_version: 12 - -install: - - ps: Install-Product node $env:nodejs_version - - npm install - -build: off - -test_script: - - node --version - - npm --version - - npm test