From 846478a41b15ff7dd32d8ba22512ff742c14c6c8 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 12 Jun 2025 14:13:24 +0200 Subject: [PATCH 1/3] Move lint job from circleci to GitHub Actions --- .circleci/config.yml | 37 ------------------------------------- .github/workflows/lint.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 900b4660..7638275f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,13 +16,9 @@ workflows: requires: - docs-build - build - - lint filters: branches: only: main - - lint: - requires: - - build - test-backends: requires: - build @@ -610,39 +606,6 @@ jobs: name: Deploy to GitHub pages # Version pinned to 3.0.0 because of https://github.com/tschaub/gh-pages/issues/354 command: npx gh-pages@3.0.0 --message "Update docs [skip ci]" --dist docs_deployment --user "CI deployment " --repo "git@github.com:cosmos/cosmjs.git" - lint: - docker: - - image: cimg/node:18.20 - steps: - - run: - name: Install Git Large File Storage (LFS) - command: sudo apt-get install git-lfs - - checkout - - attach_workspace: - at: /tmp/builds - - run: - name: Merge build folders into project (merge with hardlinks) - command: cp --recursive --link /tmp/builds/* . - - run: - name: Install shfmt - command: | - sudo wget https://github.com/mvdan/sh/releases/download/v3.2.1/shfmt_v3.2.1_linux_amd64 -O /usr/local/bin/shfmt - sudo chmod +x /usr/local/bin/shfmt - shfmt --version - - run: - name: Version information - command: echo "node $(node --version)"; echo "yarn $(yarn --version)" - - run: - name: Install libusb - command: | - sudo apt update - sudo apt install libusb-1.0-0-dev - - run: - name: Install Dependencies - command: yarn install --immutable --immutable-cache --check-cache - - run: - name: Lint - command: yarn lint faucet-docker: docker: - image: cimg/go:1.17.8 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..8a7fbbcb --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ + +name: Lint + +on: + pull_request: + push: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + lfs: true + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '20.x' + cache: 'yarn' + + - name: Install dependencies + run: yarn install --immutable --immutable-cache --check-cache + + - name: Lint + run: yarn lint From e394361b80bf298b784a809c85eee254e63fd46f Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 12 Jun 2025 14:14:08 +0200 Subject: [PATCH 2/3] Remove unused mergify --- .circleci/config.yml | 1 - .mergify.yml | 20 -------------------- 2 files changed, 21 deletions(-) delete mode 100644 .mergify.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 7638275f..76b3838d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,6 @@ orbs: workflows: version: 2 workflow: - # Keep those job names in sync with .mergify.yml jobs: - build - docs-build: diff --git a/.mergify.yml b/.mergify.yml deleted file mode 100644 index d6206bf0..00000000 --- a/.mergify.yml +++ /dev/null @@ -1,20 +0,0 @@ -# See https://doc.mergify.io/configuration.html - -pull_request_rules: - - name: automerge to main with label automerge - conditions: - - "#approved-reviews-by>=1" - - base=main - - label=automerge - - label!=WIP - # We need to list them all individually. Here is why: https://doc.mergify.io/conditions.html#validating-all-status-check - - "status-success=ci/circleci: build" - - "status-success=ci/circleci: coverage" - - "status-success=ci/circleci: docs-build" - - "status-success=ci/circleci: lint" - - "status-success=ci/circleci: test" - - "status-success=ci/circleci: test-chrome" - actions: - merge: - method: merge - strict: false From d0a7338dc843dda39bd2249c14fe51b8c9d92819 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 12 Jun 2025 14:20:05 +0200 Subject: [PATCH 3/3] Add missing build step before linting --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8a7fbbcb..0010ca27 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,5 +26,8 @@ jobs: - name: Install dependencies run: yarn install --immutable --immutable-cache --check-cache + - name: Build + run: yarn build + - name: Lint run: yarn lint