From f959f73be62e6e534342884e3b7aa63bbadae7e8 Mon Sep 17 00:00:00 2001 From: Kevin Marrec Date: Fri, 10 Jan 2020 21:29:35 +0100 Subject: [PATCH] chore: use github actions --- .circleci/config.yml | 38 -------------------------------------- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 38 deletions(-) delete mode 100755 .circleci/config.yml create mode 100644 .github/workflows/test.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100755 index 78c4e41c..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: circleci/node - steps: - # Checkout repository - - checkout - - # Restore cache - - restore_cache: - key: yarn-cache-{{ checksum "yarn.lock" }} - - # Install dependencies - - run: - name: Install Dependencies - command: NODE_ENV=dev yarn - - # Keep cache - - save_cache: - key: yarn-cache-{{ checksum "yarn.lock" }} - paths: - - "node_modules" - - # Lint - - run: - name: Lint - command: yarn lint - - # Tests - - run: - name: Tests - command: yarn jest - - # Coverage - - run: - name: Coverage - command: yarn codecov diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..a454d46a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - uses: actions/cache@v1 + id: cache + with: + path: "node_modules" + key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }} + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: yarn + + - name: Run tests + run: yarn test + + - name: Coverage + run: yarn codecov + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}