Skip to content

Commit c23d6fe

Browse files
tdeekensPalumbo
authored andcommitted
refactor(ci): to not use circleci but only github (#1936)
* refactor(ci): to not use circleci but only github * refactor: to have one regression job
1 parent 4288e56 commit c23d6fe

File tree

7 files changed

+127
-167
lines changed

7 files changed

+127
-167
lines changed

.circleci/config.yml

Lines changed: 0 additions & 143 deletions
This file was deleted.

.github/actions/ci/action.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
description: Shared action to install dependencies
4+
5+
runs:
6+
using: composite
7+
8+
steps:
9+
- name: Install pnpm
10+
uses: pnpm/[email protected]
11+
with:
12+
run_install: false
13+
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version-file: ".nvmrc"
18+
cache: "pnpm"
19+
20+
- name: Install
21+
run: pnpm install
22+
shell: bash

.github/workflows/quality.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Quality
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
linting:
11+
name: Linting
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup
19+
uses: ./.github/actions/ci
20+
21+
- name: Lint
22+
run: pnpm lint
23+
24+
type-checking:
25+
name: Type checking
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup
33+
uses: ./.github/actions/ci
34+
35+
- name: TypeScript
36+
run: pnpm typecheck:ts
37+
38+
- name: Flow
39+
run: pnpm typecheck:flow
40+
41+
testing:
42+
name: Testing
43+
needs: [linting, type-checking]
44+
runs-on: ubuntu-latest
45+
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
50+
- name: Setup
51+
uses: ./.github/actions/ci
52+
53+
- name: Build
54+
run: pnpm build
55+
56+
- uses: oNaiPs/secrets-to-env-action@v1
57+
with:
58+
secrets: ${{ toJSON(secrets) }}
59+
60+
- name: Test (with coverage)
61+
run: pnpm test:coverage:ci
62+
63+
- name: Integration tests
64+
run: pnpm test:integration
65+
66+
regression-testing:
67+
name: Regression Testing
68+
needs: [testing]
69+
runs-on: ubuntu-latest
70+
strategy:
71+
matrix:
72+
version: [18, 20]
73+
fail-fast: true
74+
max-parallel: 1
75+
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v4
79+
80+
- name: Setup
81+
uses: ./.github/actions/ci
82+
83+
- uses: actions/setup-node@v4
84+
with:
85+
node-version: ${{ matrix.version }}
86+
87+
- name: Build
88+
run: pnpm build
89+
90+
- uses: oNaiPs/secrets-to-env-action@v1
91+
with:
92+
secrets: ${{ toJSON(secrets) }}
93+
94+
- name: Integration tests
95+
run: pnpm test:integration

.github/workflows/release.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,8 @@ jobs:
2626
# https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8
2727
token: ${{ steps.generate_github_token.outputs.token }}
2828

29-
- name: Install pnpm
30-
uses: pnpm/[email protected]
31-
with:
32-
run_install: false
33-
34-
- name: Setup Node (uses version in .nvmrc)
35-
uses: actions/setup-node@v4
36-
with:
37-
node-version-file: '.nvmrc'
38-
cache: 'pnpm'
39-
40-
- name: Install dependencies
41-
run: pnpm install --frozen-lockfile
29+
- name: Setup
30+
uses: ./.github/actions/ci
4231

4332
- name: Creating .npmrc
4433
run: |

docs/README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@
66
</p>
77

88
<p align="center">
9-
<a href="https://travis-ci.org/commercetools/nodejs">
10-
<img alt="Travis CI Status" src="https://img.shields.io/travis/commercetools/nodejs/master.svg?style=flat-square&label=travis">
9+
<a href="https://github.com/commercetools/nodejs/actions">
10+
<img alt="GitHub Actions Status" src="https://github.com/commercetools/nodejs/actions/workflows/quality.yml/badge.svg">
1111
</a>
1212
<a href="https://codecov.io/gh/commercetools/nodejs">
1313
<img src="https://img.shields.io/codecov/c/github/commercetools/nodejs.svg" alt="Codecov" />
1414
</a>
15-
<a href="https://waffle.io/commercetools/nodejs-tasks-board">
16-
<img alt="Waffle.io Board" src="https://img.shields.io/badge/Waffle-board-yellow.svg?style=flat-square">
17-
</a>
1815
</p>
1916

2017
The **commercetools nodejs** repo is managed as a [monorepo](https://github.com/lerna/lerna) and contains different npm packages.

docs/cli/csv-parser-orders.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CSV Parser Orders
22

3-
[![Travis Build Status][travis-icon]][travis]
3+
[![GitHub Actions Status][github-actions-icon]][github-actions]
44
[![Codecov Coverage Status][codecov-icon]][codecov]
55
[![David Dependencies Status][david-icon]][david]
66
[![David devDependencies Status][david-dev-icon]][david-dev]
@@ -468,8 +468,8 @@ More delivery examples can be seen [here](https://github.com/commercetools/nodej
468468

469469
[commercetools]: https://commercetools.com/
470470
[commercetools-icon]: https://cdn.rawgit.com/commercetools/press-kit/master/PNG/72DPI/CT%20logo%20horizontal%20RGB%2072dpi.png
471-
[travis]: https://travis-ci.org/commercetools/csv-parser-orders
472-
[travis-icon]: https://img.shields.io/travis/commercetools/csv-parser-orders/master.svg?style=flat-square
471+
[github-actions]: https://github.com/commercetools/nodejs/actions/workflows/quality.yml
472+
[github-actions-icon]: https://github.com/commercetools/nodejs/actions/workflows/quality.yml/badge.svg
473473
[codecov]: https://codecov.io/gh/commercetools/csv-parser-orders
474474
[codecov-icon]: https://img.shields.io/codecov/c/github/commercetools/csv-parser-orders.svg?style=flat-square
475475
[david]: https://david-dm.org/commercetools/csv-parser-orders

docs/cli/csv-parser-price.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CSV Parser Price
22

3-
[![Travis Build Status][travis-icon]][travis]
3+
[![GitHub Actions Status][github-actions-icon]][github-actions]
44
[![Codecov Coverage Status][codecov-icon]][codecov]
55
[![David Dependencies Status][david-icon]][david]
66
[![David devDependencies Status][david-dev-icon]][david-dev]
@@ -181,8 +181,8 @@ JSON object returned from the conversion of the CSV file above
181181

182182
[commercetools]: https://commercetools.com/
183183
[commercetools-icon]: https://cdn.rawgit.com/commercetools/press-kit/master/PNG/72DPI/CT%20logo%20horizontal%20RGB%2072dpi.png
184-
[travis]: https://travis-ci.org/commercetools/csv-parser-price
185-
[travis-icon]: https://img.shields.io/travis/commercetools/csv-parser-price/master.svg?style=flat-square
184+
[github-actions]: https://github.com/commercetools/nodejs/actions/workflows/quality.yml
185+
[github-actions-icon]: https://github.com/commercetools/nodejs/actions/workflows/quality.yml/badge.svg
186186
[codecov]: https://codecov.io/gh/commercetools/csv-parser-price
187187
[codecov-icon]: https://img.shields.io/codecov/c/github/commercetools/csv-parser-price.svg?style=flat-square
188188
[david]: https://david-dm.org/commercetools/csv-parser-price

0 commit comments

Comments
 (0)