Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: New CI setup based on GitHub Actions
- Loading branch information
Showing
4 changed files
with
293 additions
and
58 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# master only | ||
|
||
name: Integrate | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
linuxNode16: | ||
name: '[Linux] Node.js v16: Unit tests' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Retrieve dependencies from cache | ||
id: cacheNpm | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | ||
restore-keys: npm-v16-${{ runner.os }}-${{ github.ref }}- | ||
|
||
- name: Install Node.js and npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install dependencies | ||
if: steps.cacheNpm.outputs.cache-hit != 'true' | ||
run: | | ||
npm update --no-save | ||
npm update --save-dev --no-save | ||
- name: Unit tests | ||
run: script -e -c "npm test" | ||
|
||
windowsNode16: | ||
name: '[Windows] Node.js v16: Unit tests' | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Retrieve dependencies from cache | ||
id: cacheNpm | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | ||
restore-keys: npm-v16-${{ runner.os }}-${{ github.ref }}- | ||
|
||
- name: Install Node.js and npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install dependencies | ||
if: steps.cacheNpm.outputs.cache-hit != 'true' | ||
run: | | ||
npm update --no-save | ||
npm update --save-dev --no-save | ||
- name: Unit tests | ||
run: npm test | ||
|
||
linuxNode14: | ||
name: '[Linux] Node.js 14: Unit tests' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Retrieve dependencies from cache | ||
id: cacheNpm | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | ||
restore-keys: npm-v14-${{ runner.os }}-${{ github.ref }}- | ||
|
||
- name: Install Node.js and npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Install dependencies | ||
if: steps.cacheNpm.outputs.cache-hit != 'true' | ||
run: | | ||
npm update --no-save | ||
npm update --save-dev --no-save | ||
- name: Unit tests | ||
run: script -e -c "npm test" | ||
|
||
linuxNode12: | ||
name: '[Linux] Node.js v12: Unit tests' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Retrieve dependencies from cache | ||
id: cacheNpm | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: npm-v12-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | ||
restore-keys: npm-v12-${{ runner.os }}-${{ github.ref }}- | ||
|
||
- name: Install Node.js and npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Install dependencies | ||
if: steps.cacheNpm.outputs.cache-hit != 'true' | ||
run: | | ||
npm update --no-save | ||
npm update --save-dev --no-save | ||
- name: Unit tests | ||
run: script -e -c "npm test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
# PR's only | ||
|
||
name: Validate | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
linuxNode16: | ||
name: '[Linux] Node.js v16: Lint, Formatting & Unit tests' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
# For commitlint purpose ensure to have complete list of PR commits | ||
# It's loose and imperfect assumption that PR has no more than 30 commits | ||
fetch-depth: 30 | ||
|
||
- name: Retrieve last master commit (for `git diff` purposes) | ||
run: | | ||
git checkout -b pr | ||
git fetch --prune --depth=30 origin +refs/heads/master:refs/remotes/origin/master | ||
git checkout master | ||
git checkout pr | ||
- name: Retrieve dependencies from cache | ||
id: cacheNpm | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
npm-v16-${{ runner.os }}-${{ github.ref }}- | ||
npm-v16-${{ runner.os }}-refs/heads/master- | ||
- name: Install Node.js and npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install dependencies | ||
if: steps.cacheNpm.outputs.cache-hit != 'true' | ||
run: | | ||
npm update --no-save | ||
npm update --save-dev --no-save | ||
- name: Validate Prettier formatting | ||
run: npm run prettier-check:updated | ||
- name: Validate ESLint rules | ||
run: npm run lint:updated | ||
- name: Unit tests | ||
run: script -e -c "npm test" | ||
|
||
windowsNode16: | ||
name: '[Windows] Node.js v16: Unit tests' | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Retrieve dependencies from cache | ||
id: cacheNpm | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: npm-v16-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
npm-v16-${{ runner.os }}-${{ github.ref }}- | ||
npm-v16-${{ runner.os }}-refs/heads/master- | ||
- name: Install Node.js and npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Install dependencies | ||
if: steps.cacheNpm.outputs.cache-hit != 'true' | ||
run: | | ||
npm update --no-save | ||
npm update --save-dev --no-save | ||
- name: Unit tests | ||
run: npm test | ||
|
||
linuxNode14: | ||
name: '[Linux] Node.js 14: Unit tests' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Retrieve dependencies from cache | ||
id: cacheNpm | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
npm-v14-${{ runner.os }}-${{ github.ref }}- | ||
npm-v14-${{ runner.os }}-refs/heads/master- | ||
- name: Install Node.js and npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Install dependencies | ||
if: steps.cacheNpm.outputs.cache-hit != 'true' | ||
run: | | ||
npm update --no-save | ||
npm update --save-dev --no-save | ||
- name: Unit tests | ||
# Some tests depend on TTY support, which is missing in GA runner | ||
# Workaround taken from https://github.com/actions/runner/issues/241#issuecomment-577360161 | ||
run: script -e -c "npm test" | ||
|
||
linuxNode12: | ||
name: '[Linux] Node.js v12: Unit tests' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Retrieve dependencies from cache | ||
id: cacheNpm | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.npm | ||
node_modules | ||
key: npm-v12-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }} | ||
restore-keys: | | ||
npm-v12-${{ runner.os }}-${{ github.ref }}- | ||
npm-v12-${{ runner.os }}-refs/heads/master- | ||
- name: Install Node.js and npm | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Install dependencies | ||
if: steps.cacheNpm.outputs.cache-hit != 'true' | ||
run: | | ||
npm update --no-save | ||
npm update --save-dev --no-save | ||
- name: Unit tests | ||
run: script -e -c "npm test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters