From b41d8766cea05903e56a84f19fb40dccdcfa6e11 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Sat, 29 Jul 2023 08:28:02 +0800 Subject: [PATCH] chore(ci): switch to GitHub Actions --- .github/workflows/tester.yml | 22 ++++++++++++++++++++++ .travis.yml | 17 ----------------- README.md | 2 +- 3 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/tester.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml new file mode 100644 index 0000000..67f9f56 --- /dev/null +++ b/.github/workflows/tester.yml @@ -0,0 +1,22 @@ +name: Tester + +on: [push, pull_request] + +jobs: + linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + - name: Install Dependencies + run: npm install + - run: npm run eslint + - name: Coverage + run: npx nyc --reporter=lcovonly npm run test + env: + CI: true + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4535a4e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js - -cache: - npm: true - -node_js: - - "10" - - "12" - - "14" - -script: - - npm run eslint - - npm run test-cov - -after_script: - - npm install coveralls - - nyc report --reporter=text-lcov | coveralls diff --git a/README.md b/README.md index 2c96ccc..7744f89 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # hexo-generator-alias -[![Build Status](https://travis-ci.org/hexojs/hexo-generator-alias.svg?branch=master)](https://travis-ci.org/hexojs/hexo-generator-alias) +[![Build Status](https://img.shields.io/github/actions/workflow/status/hexojs/hexo-generator-alias/tester.yml?branch=master&label=test)](https://github.com/hexojs/hexo-generator-alias/actions?query=workflow%3ATester) [![NPM version](https://badge.fury.io/js/hexo-generator-alias.svg)](https://www.npmjs.com/package/hexo-generator-alias) [![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-generator-alias.svg)](https://coveralls.io/r/hexojs/hexo-generator-alias?branch=master)