Skip to content

Commit

Permalink
test: change travis to github action (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc committed Mar 27, 2024
1 parent d50393a commit a567883
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build

on: [push, pull_request]

concurrency:
group: ${{github.workflow}}-${{github.event_name}}-${{github.ref}}
cancel-in-progress: true

jobs:
test-and-build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 13

- name: Install Dependencies
run: npm install

- name: Run build & test
run: |
npm run build
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ package-lock.json
__tests__
src
.babelrc
.travis.yml
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> Mock `Date` when run unit test cases with jest. Make tests of `Date` easier.
[![Build Status](https://travis-ci.org/hustcc/jest-date-mock.svg?branch=master)](https://travis-ci.org/hustcc/jest-date-mock)
[![Build Status](https://github.com/hustcc/jest-date-mock/workflows/build/badge.svg)](https://github.com/hustcc/jest-date-mock/actions)
[![Coverage Status](https://coveralls.io/repos/github/hustcc/jest-date-mock/badge.svg?branch=master)](https://coveralls.io/github/hustcc/jest-date-mock)
[![npm](https://img.shields.io/npm/v/jest-date-mock.svg)](https://www.npmjs.com/package/jest-date-mock)
[![npm](https://img.shields.io/npm/dm/jest-date-mock.svg)](https://www.npmjs.com/package/jest-date-mock)
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"typings": "lib/index.d.ts",
"scripts": {
"test": "jest --no-cache",
"build": "babel src --out-dir lib --copy-files && npm run test",
"coveralls": "cat ./coverage/lcov.info | coveralls"
"build": "babel src --out-dir lib --copy-files && npm run test"
},
"repository": {
"type": "git",
Expand All @@ -33,7 +32,6 @@
"@babel/preset-env": "^7.7.7",
"babel-jest": "^24.9.0",
"babel-plugin-version": "^0.2.2",
"coveralls": "^3.0.0",
"jest": "^24.9.0"
},
"jest": {
Expand Down

0 comments on commit a567883

Please sign in to comment.