Skip to content

Commit

Permalink
chore: auto release (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Dec 19, 2022
1 parent a088e99 commit 5420a47
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 82 deletions.
17 changes: 0 additions & 17 deletions .autod.conf.js

This file was deleted.

52 changes: 12 additions & 40 deletions .github/workflows/nodejs.yml
@@ -1,46 +1,18 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI
name: CI

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
schedule:
- cron: '0 2 * * *'

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: [14, 16]
os: [ubuntu-latest, macos-latest]
branches: [ master ]

steps:
- name: Checkout Git Source
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm i
pull_request:
branches: [ master ]

- name: Continuous Integration
run: npm run ci
workflow_dispatch: {}

- name: Code Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
jobs:
Job:
name: Node.js
uses: artusjs/github-actions/.github/workflows/node-test.yml@v1
with:
os: 'ubuntu-latest, macos-latest'
version: '14, 16, 18'
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,17 @@
name: Release

on:
push:
branches: [ master ]

workflow_dispatch: {}

jobs:
release:
name: Node.js
uses: artusjs/github-actions/.github/workflows/node-release.yml@v1
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
with:
checkTest: false
6 changes: 0 additions & 6 deletions README.md
@@ -1,20 +1,14 @@
# egg-cluster

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/egg-cluster.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-cluster
[travis-image]: https://img.shields.io/travis/eggjs/egg-cluster.svg?style=flat-square
[travis-url]: https://travis-ci.org/eggjs/egg-cluster
[codecov-image]: https://codecov.io/github/eggjs/egg-cluster/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/eggjs/egg-cluster?branch=master
[david-image]: https://img.shields.io/david/eggjs/egg-cluster.svg?style=flat-square
[david-url]: https://david-dm.org/eggjs/egg-cluster
[snyk-image]: https://snyk.io/test/npm/egg-cluster/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-cluster
[download-image]: https://img.shields.io/npm/dm/egg-cluster.svg?style=flat-square
Expand Down
18 changes: 5 additions & 13 deletions package.json
Expand Up @@ -4,13 +4,11 @@
"description": "cluster manager for egg",
"main": "index.js",
"scripts": {
"autod": "autod",
"lint": "eslint .",
"test": "npm run lint -- --fix && npm run test-local",
"test-local": "egg-bin test",
"cov": "egg-bin cov --prerequire --timeout 100000",
"ci": "npm run lint && egg-bin pkgfiles --check && npm run cov",
"pkgfiles": "egg-bin pkgfiles"
"ci": "npm run lint && npm run cov"
},
"files": [
"index.js",
Expand Down Expand Up @@ -51,13 +49,11 @@
},
"devDependencies": {
"address": "^1.0.3",
"autod": "^3.0.1",
"coffee": "^5.2.1",
"egg": "^2.20.0",
"egg-bin": "^4.11.1",
"egg-ci": "^2.2.0",
"egg": "^3.9.0",
"egg-bin": "^5.6.1",
"egg-errors": "^2.2.0",
"egg-mock": "^3.22.1",
"egg-mock": "^5.4.0",
"eslint": "^8.26.0",
"eslint-config-egg": "^12.1.0",
"mz": "^2.7.0",
Expand All @@ -67,10 +63,6 @@
"typescript": "^2.7.2"
},
"engines": {
"node": ">= 8.0.0"
},
"ci": {
"type": "github",
"version": "14, 16, 18"
"node": ">= 14.0.0"
}
}
2 changes: 1 addition & 1 deletion test/agent_worker.test.js
Expand Up @@ -12,7 +12,7 @@ describe('test/agent_worker.test.js', () => {
let app;

describe('Fork Agent', () => {
afterEach(() => app.close());
afterEach(() => app && app.close());

it('support config agent debug port', () => {
mm(process.env, 'EGG_AGENT_DEBUG_PORT', '15800');
Expand Down
2 changes: 1 addition & 1 deletion test/app_worker.test.js
Expand Up @@ -11,7 +11,7 @@ const utils = require('./utils');

describe('test/app_worker.test.js', () => {
let app;
afterEach(() => app.close());
afterEach(() => app && app.close());

describe('app worker', () => {
before(() => {
Expand Down
4 changes: 2 additions & 2 deletions test/https.test.js
Expand Up @@ -12,7 +12,7 @@ describe('test/https.test.js', () => {
afterEach(mm.restore);

describe('start https server with cluster options', () => {
afterEach(() => app.close());
afterEach(() => app && app.close());

it('should success with status 200', function* () {

Expand Down Expand Up @@ -41,7 +41,7 @@ describe('test/https.test.js', () => {
});

describe('start https server with app config cluster', () => {
afterEach(() => app.close());
afterEach(() => app && app.close());

it('should success with status 200', function* () {
const baseDir = path.join(__dirname, 'fixtures/apps/https-server-config');
Expand Down
2 changes: 1 addition & 1 deletion test/master.test.js
Expand Up @@ -18,7 +18,7 @@ describe('test/master.test.js', () => {
afterEach(mm.restore);

describe('start master', () => {
afterEach(() => app.close());
afterEach(() => app && app.close());

it('start success in local env', done => {
mm.env('local');
Expand Down
2 changes: 1 addition & 1 deletion test/worker_threads.test.js
Expand Up @@ -6,7 +6,7 @@ describe('worker_threads', () => {
let app;

describe('Fork Agent', () => {
afterEach(() => app.close());
afterEach(() => app && app.close());

it('support config agent debug port', async () => {
app = utils.cluster('apps/agent-worker-threads', { startMode: 'worker_threads' });
Expand Down

0 comments on commit 5420a47

Please sign in to comment.