Skip to content

Commit

Permalink
ci: Configure GitHub Actions
Browse files Browse the repository at this point in the history
Closes #202.
  • Loading branch information
luczsoma committed Mar 28, 2020
1 parent 4386906 commit 4238249
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 8 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node: [13, 12, 11, 10]
fail-fast: false

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npx commitlint --from HEAD^ --to HEAD --config .commitlintrc.json
- run: npm run build-and-test-everything
- uses: sonarsource/[email protected]
if: github.event_name == 'push'
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Continuous Integration workflow

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node: [13, 12, 11, 10]
fail-fast: false

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npx commitlint --from HEAD^ --to HEAD --config .commitlintrc.json
- run: npm run build-and-test-everything
- uses: sonarsource/[email protected]
if: github.event_name == 'push'
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# resily

Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback. Inspired by [App-vNext/Polly](https://github.com/App-vNext/Polly).
Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Fallback, Circuit Breaker, Timeout, Bulkhead Isolation, and Cache. Inspired by [App-vNext/Polly](https://github.com/App-vNext/Polly).

<p>
<a href="https://travis-ci.org/Diplomatiq/resily" target="_blank" style="text-decoration: none;">
<img src="https://img.shields.io/travis/Diplomatiq/resily.svg" alt="build status">
<a href="https://github.com/Diplomatiq/resily/actions" target="_blank" style="text-decoration: none;">
<img src="https://github.com/Diplomatiq/resily/workflows/CI%20workflow/badge.svg" alt="build status">
</a>

<a href="https://github.com/Diplomatiq/resily" target="_blank" style="text-decoration: none;">
Expand Down
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{
"name": "@diplomatiq/resily",
"version": "0.0.0",
"description": "Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback. Inspired by App-vNext/Polly.",
"description": "Resily is a TypeScript resilience and transient-fault-handling library that allows developers to express policies such as Retry, Fallback, Circuit Breaker, Timeout, Bulkhead Isolation, and Cache. Inspired by App-vNext/Polly.",
"main": "dist/main.js",
"module": "dist/main.js",
"types": "dist/main.d.ts",
"engines": {
"node": ">=9.0.0"
"node": ">=10.0.0"
},
"scripts": {
"build": "tsc",
"build-and-test-everything": "npm run lint && npm run build && npm run test",
"check-release-tag": "node --experimental-modules scripts/check-release-tag.mjs",
"clean": "rm -r ./dist/",
"lint": "eslint ./src/ ./test/ --ext .ts",
"prepare": "npm run build-and-test-everything",
"prepublishOnly": "npm run check-release-tag",
"prepublishOnly": "npm run check-release-tag && npm run build-and-test-everything",
"test": "cross-env-shell TS_NODE_PROJECT=tsconfig.test.json nyc --reporter=lcov --reporter=text mocha --require ts-node/register --require source-map-support/register --require esm --recursive test/specs/**/*.test.ts",
"version": "node --experimental-modules scripts/sync-sonar-version.mjs && conventional-changelog -p angular -i CHANGELOG.md -s && git add sonar-project.properties CHANGELOG.md"
},
Expand All @@ -40,7 +39,6 @@
"homepage": "https://github.com/Diplomatiq/resily#readme",
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/travis-cli": "^8.3.5",
"@diplomatiq/eslint-config-tslib": "^3.0.0",
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
Expand Down
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Standard properties
sonar.organization=diplomatiq
sonar.projectKey=Diplomatiq_resily
sonar.projectName=resily
sonar.projectVersion=0.0.0
Expand Down

0 comments on commit 4238249

Please sign in to comment.