From 066a9627eeeff085276e8e914fd24c5bcd9b1b2f Mon Sep 17 00:00:00 2001 From: d0whc3r Date: Mon, 6 Jul 2020 00:10:54 +0200 Subject: [PATCH] refactor(ci): use gitlabci --- .gitlab-ci-old.yml => .gitlab-ci.yml | 0 README.md | 2 +- .../node.js.yml => workflows/release.yml | 4 +- workflows/tests.yml | 38 +++++++++++++++++++ 4 files changed, 41 insertions(+), 3 deletions(-) rename .gitlab-ci-old.yml => .gitlab-ci.yml (100%) rename .github/workflows/node.js.yml => workflows/release.yml (97%) create mode 100644 workflows/tests.yml diff --git a/.gitlab-ci-old.yml b/.gitlab-ci.yml similarity index 100% rename from .gitlab-ci-old.yml rename to .gitlab-ci.yml diff --git a/README.md b/README.md index 3c75708b..8dd444fa 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Utility to manipulate google drive using nodejs. It could upload content to goog # :eyes: Project status -![Node.js CI](https://github.com/d0whc3r/node-gdrive/workflows/Node.js%20CI/badge.svg) +[![pipeline status](https://gitlab.com/d0whc3r/node-gdrive/badges/master/pipeline.svg)](https://github.com/d0whc3r/node-gdrive) [![codecov](https://codecov.io/gh/d0whc3r/node-gdrive/branch/master/graph/badge.svg)](https://codecov.io/gh/d0whc3r/node-gdrive) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/2612116bab5f493cada70bffc3cb6492)](https://www.codacy.com/app/d0whc3r/node-gdrive?utm_source=github.com&utm_medium=referral&utm_content=d0whc3r/node-gdrive&utm_campaign=Badge_Grade) diff --git a/.github/workflows/node.js.yml b/workflows/release.yml similarity index 97% rename from .github/workflows/node.js.yml rename to workflows/release.yml index 58fd31de..6a5b010c 100644 --- a/.github/workflows/node.js.yml +++ b/workflows/release.yml @@ -1,7 +1,7 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Node.js CI +name: Sonar CI on: push: @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [14.x] steps: - uses: actions/checkout@v2 diff --git a/workflows/tests.yml b/workflows/tests.yml new file mode 100644 index 00000000..18e42517 --- /dev/null +++ b/workflows/tests.yml @@ -0,0 +1,38 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + env: + CI: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} + CODECOVS_TOKEN: ${{ secrets.CODECOVS_TOKEN }} + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + CREDENTIALS_JSON: ${{ secrets.CREDENTIALS_JSON }} + DELETE_ALL_FILES: ${{ secrets.DELETE_ALL_FILES }} + TOKEN_JSON: ${{ secrets.TOKEN_JSON }} + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn build + - run: yarn test:coverage