Skip to content

Commit d86aca2

Browse files
authored
CI/CD (acacode#199)
* feat: add "onFormatRouteName" hook * chore: try to add github workflows * chore: rename gh workflow file to main * chore: fix changelog after rebase * chore: try to test gh workflow * ci/cd: update gh workflows * ci/cd: fix tests * ci/cd: fix PR call jobs * ci/cd: add setup for pr for the next branch * docs: add CI badge * chore: remove travis * ci/cd: try to add job strategy
1 parent fe83186 commit d86aca2

File tree

5 files changed

+18
-37
lines changed

5 files changed

+18
-37
lines changed

.github/workflows/main.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# This is a basic workflow to help you get started with Actions
22

3-
name: CI
3+
name: Run tests
44

55
# Controls when the action will run.
66
on:
77
# Triggers the workflow on push or pull request events but only for the master branch
8-
push:
9-
branches: [ master ]
108
pull_request:
11-
branches: [ next ]
9+
branches: [ master, next ]
1210

1311
# Allows you to run this workflow manually from the Actions tab
1412
workflow_dispatch:
@@ -19,18 +17,21 @@ jobs:
1917
build:
2018
# The type of runner that the job will run on
2119
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
node-version: [11.x, 13.x, 15.x]
23+
24+
name: Node.js (test-all) ${{ matrix.node-version }}
2225

2326
# Steps represent a sequence of tasks that will be executed as part of the job
2427
steps:
2528
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2629
- uses: actions/checkout@v2
2730

2831
# Runs a single command using the runners shell
29-
- name: Run a one-line script
30-
run: echo Hello, world!
32+
- name: install deps
33+
run: npm i
3134

3235
# Runs a set of commands using the runners shell
33-
- name: Run a multi-line script
34-
run: |
35-
echo Add other actions to build,
36-
echo test, and deploy your project.
36+
- name: test
37+
run: npm run test-all

.travis.yml

-23
This file was deleted.

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# next release
22

3+
4+
35
# 6.4.0
46

57
Features:

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# swagger-typescript-api
22

3-
[![Greenkeeper badge](https://badges.greenkeeper.io/acacode/swagger-typescript-api.svg)](https://greenkeeper.io/)
43
[![NPM badge](https://img.shields.io/npm/v/swagger-typescript-api.svg)](https://www.npmjs.com/package/swagger-typescript-api)
5-
[![Build Status](https://travis-ci.org/acacode/swagger-typescript-api.svg?branch=master)](https://travis-ci.org/acacode/swagger-typescript-api) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
[![CI](https://github.com/acacode/swagger-typescript-api/actions/workflows/main.yml/badge.svg?branch=next)](https://github.com/acacode/swagger-typescript-api/actions/workflows/main.yml) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
65
[![All Contributors](https://img.shields.io/badge/all_contributors-20-orange.svg)](#contributors)
76
<!-- ALL-CONTRIBUTORS-BADGE:END -->
87

tests/helpers/validateGeneratedModule.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ module.exports = ({ pathToFile }) => {
4040
if (diagnostics.length) {
4141
process.stdout.write(`\r\n`);
4242
} else {
43-
process.stdout.clearLine(process.stdout);
44-
process.stdout.cursorTo(0);
43+
if (process.stdout.clearLine && process.stdout.cursorTo) {
44+
process.stdout.clearLine(process.stdout);
45+
process.stdout.cursorTo(0);
46+
}
4547
}
4648

4749
return diagnostics;

0 commit comments

Comments
 (0)