Skip to content

Commit

Permalink
CI/CD (#199)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
js2me authored Mar 7, 2021
1 parent fe83186 commit d86aca2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 37 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# This is a basic workflow to help you get started with Actions

name: CI
name: Run tests

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ next ]
branches: [ master, next ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -19,18 +17,21 @@ jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [11.x, 13.x, 15.x]

name: Node.js (test-all) ${{ matrix.node-version }}

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

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
- name: install deps
run: npm i

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
- name: test
run: npm run test-all
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# next release



# 6.4.0

Features:
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# swagger-typescript-api

[![Greenkeeper badge](https://badges.greenkeeper.io/acacode/swagger-typescript-api.svg)](https://greenkeeper.io/)
[![NPM badge](https://img.shields.io/npm/v/swagger-typescript-api.svg)](https://www.npmjs.com/package/swagger-typescript-api)
[![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 -->
[![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 -->
[![All Contributors](https://img.shields.io/badge/all_contributors-20-orange.svg)](#contributors)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Expand Down
6 changes: 4 additions & 2 deletions tests/helpers/validateGeneratedModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ module.exports = ({ pathToFile }) => {
if (diagnostics.length) {
process.stdout.write(`\r\n`);
} else {
process.stdout.clearLine(process.stdout);
process.stdout.cursorTo(0);
if (process.stdout.clearLine && process.stdout.cursorTo) {
process.stdout.clearLine(process.stdout);
process.stdout.cursorTo(0);
}
}

return diagnostics;
Expand Down

0 comments on commit d86aca2

Please sign in to comment.