Skip to content

Commit

Permalink
Merge pull request #299 from mrmlnc/TRIVIAL_github_actions
Browse files Browse the repository at this point in the history
TRIVIAL: introduce GitHub Actions
  • Loading branch information
mrmlnc committed Dec 27, 2020
2 parents fd30c7e + 485d3b5 commit 9fb903d
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 143 deletions.
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
82 changes: 82 additions & 0 deletions .github/workflows/benchmark.yml
@@ -0,0 +1,82 @@
name: Benchmark

on:
- push

env:
BENCHMARK_LAUNCHES: 100
BENCHMARK_MAX_STDEV: 10
BENCHMARK_RETRIES: 3

jobs:
cancel:
name: Cancel previous jobs
if: github.ref != 'refs/heads/master'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Cancel previous jobs
uses: styfle/cancel-workflow-action@0.6.0
with:
workflow_id: 4198440
access_token: ${{ github.token }}

product:
name: Product benchmark
if: always()
needs:
- cancel
runs-on: ubuntu-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: 15
- 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 benchmark with options (${{ matrix.benchmark_options }})
needs:
- cancel
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
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: 15
- 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
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,59 @@
name: CI

on:
push:
branches:
- master
- releases/*
pull_request:
branches:
- '*'

jobs:
cancel:
name: Cancel previous jobs
if: github.ref != 'refs/heads/master'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Cancel previous jobs
uses: styfle/cancel-workflow-action@0.6.0
with:
workflow_id: 4197767
access_token: ${{ github.token }}

test:
name: Node.js ${{ matrix.node_version }} on ${{ matrix.os }}
if: always()
needs:
- cancel
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
1 change: 0 additions & 1 deletion .npmignore
Expand Up @@ -2,7 +2,6 @@
.editorconfig
.gitattributes
.gitignore
.vsts
tsconfig.json
.eslintrc.json

Expand Down
30 changes: 0 additions & 30 deletions .vsts/benchmark.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .vsts/build.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .vsts/steps-benchmark.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .vsts/steps-build.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .vsts/steps-tests.yml

This file was deleted.

0 comments on commit 9fb903d

Please sign in to comment.