From 9a8188309f381476b5013692acb7c0c591be34e1 Mon Sep 17 00:00:00 2001 From: "Valentin D. Pinkman" Date: Tue, 11 May 2021 11:19:47 +0200 Subject: [PATCH] migrate to github actions --- .circleci/config.yml | 32 ---------------------------- .github/workflows/config.yml | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 32 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 86f7b0185..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: 2 - -defaults: &defaults - working_directory: ~/ledgerjs - docker: - - image: circleci/node:12-stretch-browsers - -jobs: - build: - <<: *defaults - steps: - - run: sudo apt-get update - - run: sudo apt-get install -y libudev-dev libusb-1.0-0-dev - - run: - name: Install latest yarn - command: | - curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - ; - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list ; - sudo apt-get update && sudo apt-get install yarn - sudo rm /usr/local/bin/yarn # remove docker yarn - - checkout - - restore_cache: - keys: - - v12-yarn-packages-{{ checksum "yarn.lock" }} - - run: yarn install --production - - save_cache: - key: v12-yarn-packages-{{ checksum "yarn.lock" }} - paths: - - node_modules - - run: yarn test - - run: yarn test-no-git-diff - - run: npx codecov diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml new file mode 100644 index 000000000..d0a6dba06 --- /dev/null +++ b/.github/workflows/config.yml @@ -0,0 +1,41 @@ +name: CI +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: install linux dependencies + run: sudo apt-get update && sudo apt-get install -y libudev-dev libusb-1.0-0-dev + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + repository: ${{github.event.pull_request.head.repo.full_name}} + - uses: actions/setup-node@main + with: + node-version: 12.x + - name: get yarn cache + if: always() && job.status != 'cancelled' + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + if: always() && job.status != 'cancelled' + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: install dependencies + run: yarn install --production + - name: test + run: yarn test + - name: test no git diff + run: yarn test-no-git-diff + - name: codecov + run: npx codecov \ No newline at end of file