From 3aae06da2c17bf27fc5b63795df4c4eda8043518 Mon Sep 17 00:00:00 2001 From: Gago Date: Tue, 17 Nov 2020 09:30:59 -0800 Subject: [PATCH 01/11] adding workflow + fixing eslint issues --- .github/workflows/validation.yml | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/validation.yml diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml new file mode 100644 index 0000000..d4bfdd7 --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,37 @@ +name: Validation + +on: pull_request + +jobs: + lint: + name: Linting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Install dependencies + run: | + npm install + - name: ESLint + run: npm run lint + + test: + name: Run unit tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Install dependencies + run: npm install + - name: Mocha + run: npm run test --coverage + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From 4f60ccc16443ae074785ac45bdecd23c80e9bdea Mon Sep 17 00:00:00 2001 From: Gago Date: Tue, 17 Nov 2020 10:08:41 -0800 Subject: [PATCH 02/11] running tests only --- .github/workflows/validation.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index d4bfdd7..95757d7 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -30,8 +30,9 @@ jobs: - name: Install dependencies run: npm install - name: Mocha - run: npm run test --coverage - - name: Coveralls - uses: coverallsapp/github-action@v1.1.2 + run: npm run test:only + - name: Send coverage to codecov + uses: codecov/codecov-action@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests From 88dadead8af6c5442ce9b956e2118b0fee53d6e5 Mon Sep 17 00:00:00 2001 From: Gago Date: Tue, 17 Nov 2020 10:12:16 -0800 Subject: [PATCH 03/11] pull/push/g --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 95757d7..3cd886d 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -1,6 +1,6 @@ name: Validation -on: pull_request +on: push jobs: lint: From 9a822c2f5c5d7355908d67c091799036de24fbda Mon Sep 17 00:00:00 2001 From: Gago Date: Wed, 18 Nov 2020 10:45:24 -0800 Subject: [PATCH 04/11] removing token from codecov --- .github/workflows/validation.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 3cd886d..8e58fd0 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -31,8 +31,7 @@ jobs: run: npm install - name: Mocha run: npm run test:only - - name: Send coverage to codecov + - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: unittests + fail_ci_if_error: true From 04c1e800e0b3637705979c8d09fcb61ee06e42b0 Mon Sep 17 00:00:00 2001 From: Gago Date: Wed, 18 Nov 2020 10:46:26 -0800 Subject: [PATCH 05/11] removing travis config --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e6c9774..0000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -node_js: stable - -cache: npm From ebbfdf4f0ee68861c303a3efdb0fb7dd039b6d32 Mon Sep 17 00:00:00 2001 From: Gago Date: Fri, 20 Nov 2020 10:13:26 -0800 Subject: [PATCH 06/11] adding bahmutov/npm-install to workflow --- .github/workflows/validation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 8e58fd0..6f67cbc 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -28,6 +28,7 @@ jobs: with: node-version: 12.x - name: Install dependencies + uses: bahmutov/npm-install@v1.4.5 run: npm install - name: Mocha run: npm run test:only From 8c37cb953d2fdd0428e6b73a84c111cfb1c4b39a Mon Sep 17 00:00:00 2001 From: Gago Date: Fri, 20 Nov 2020 10:16:07 -0800 Subject: [PATCH 07/11] missing name --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 6f67cbc..c5ee78a 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -27,8 +27,8 @@ jobs: uses: actions/setup-node@v1 with: node-version: 12.x + - uses: bahmutov/npm-install@v1.4.5 - name: Install dependencies - uses: bahmutov/npm-install@v1.4.5 run: npm install - name: Mocha run: npm run test:only From 8eb6d790ce72dae9baa840ddb3f12236daed75b3 Mon Sep 17 00:00:00 2001 From: Gago Date: Sun, 22 Nov 2020 18:31:24 -0800 Subject: [PATCH 08/11] Simplifying jobs --- .github/workflows/validation.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index c5ee78a..1fd2188 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -1,25 +1,9 @@ -name: Validation +name: Lint and Tests on: push jobs: - lint: - name: Linting - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Use Node.js 12.x - uses: actions/setup-node@v1 - with: - node-version: 12.x - - name: Install dependencies - run: | - npm install - - name: ESLint - run: npm run lint - - test: - name: Run unit tests + validation: runs-on: ubuntu-latest steps: - uses: actions/checkout@master @@ -30,7 +14,9 @@ jobs: - uses: bahmutov/npm-install@v1.4.5 - name: Install dependencies run: npm install - - name: Mocha + - name: Lint + run: npm run lint + - name: Tests run: npm run test:only - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From f8f8bed7c0ac6237c564128454ba05189c8c7d7c Mon Sep 17 00:00:00 2001 From: Gago Date: Wed, 25 Nov 2020 08:32:04 -0800 Subject: [PATCH 09/11] adding cache --- .github/workflows/validation.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 1fd2188..1104875 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -11,7 +11,13 @@ jobs: uses: actions/setup-node@v1 with: node-version: 12.x - - uses: bahmutov/npm-install@v1.4.5 + - name: Cache Node.js modules + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-node- - name: Install dependencies run: npm install - name: Lint From 6c07d4584490433c6e5e02ed38a7b1ce2794790f Mon Sep 17 00:00:00 2001 From: Gago Date: Wed, 25 Nov 2020 08:40:51 -0800 Subject: [PATCH 10/11] adding pull request event --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 1104875..3dbfd9f 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -1,6 +1,6 @@ name: Lint and Tests -on: push +on: [ push, pull_request ] jobs: validation: From 6620104b549d029c63fe6b7b12fc17ee5efdf3b3 Mon Sep 17 00:00:00 2001 From: Gago Date: Thu, 26 Nov 2020 22:12:18 -0800 Subject: [PATCH 11/11] avoiding pull_request event because is duplicated --- .github/workflows/validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 3dbfd9f..98a2fff 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -1,6 +1,6 @@ name: Lint and Tests -on: [ push, pull_request ] +on: push jobs: validation: