Skip to content

Commit

Permalink
build: introduce GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmlnc committed Dec 11, 2020
1 parent fd30c7e commit a8e0936
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .editorconfig
Expand Up @@ -9,7 +9,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{.travis.yml,circle.yml,appveyor.yml,.vsts/**}]
[{.travis.yml,circle.yml,appveyor.yml,.github/**}]
indent_style = space
indent_size = 2

Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/benchmark.yml
@@ -0,0 +1,78 @@
name: Benchmark

on:
- push

env:
BENCHMARK_LAUNCHES: 100
BENCHMARK_MAX_STDEV: 10
BENCHMARK_RETRIES: 3

jobs:
production:
name: Production on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version: [15]
os:
- ubuntu-latest
- macos-latest
- windows-latest
env:
BENCHMARK_TYPE: product
BENCHMARK_OPTIONS: '{}'
steps:
- name: Setup repository
uses: actions/checkout@v2
- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
run: npm install
- name: Compile sources
run: npm run compile
- name: Benchmark (async)
run: npm run bench-async
- name: Benchmark (stream)
run: npm run bench-stream
- name: Benchmark (sync)
run: npm run bench-sync

regress:
name: Regress on ${{ matrix.os }} with options (${{ matrix.benchmark_options }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version: [15]
os:
- ubuntu-latest
- macos-latest
- windows-latest
benchmark_options:
- '{}'
- '{ "objectMode": true }'
- '{ "absolute": true }'
env:
BENCHMARK_TYPE: regression
BENCHMARK_OPTIONS: ${{ matrix.benchmark_options }}
steps:
- name: Setup repository
uses: actions/checkout@v2
- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
run: npm install
- name: Compile sources
run: npm run compile
- name: Benchmark (async)
run: npm run bench-async
- name: Benchmark (stream)
run: npm run bench-stream
- name: Benchmark (sync)
run: npm run bench-sync
19 changes: 19 additions & 0 deletions .github/workflows/cancel.yml
@@ -0,0 +1,19 @@
name: Cancel Previous Runs

on:
- push

jobs:
cancel:
name: 'Cancel Previous Runs'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.6.0
with:
workflow_id: 4198440
access_token: ${{ github.token }}
- uses: styfle/cancel-workflow-action@0.6.0
with:
workflow_id: 4197767
access_token: ${{ github.token }}
39 changes: 39 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,39 @@
name: CI

on:
- push
- pull_request

jobs:
test:
name: Node.js ${{ matrix.node_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version: [8, 10, 12, 14, 15]
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Setup repository
uses: actions/checkout@v2
- name: Setup environment
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
run: npm install
- name: Compile sources
run: npm run compile
- name: Run Hygiene Checks
run: npm run lint
- name: Run unit tests
run: npm run test
- name: Run smoke tests (sync)
run: npm run smoke:sync
- name: Run smoke tests (async)
run: npm run smoke:async
- name: Run smoke tests (stream)
run: npm run smoke:stream

0 comments on commit a8e0936

Please sign in to comment.