From 8b5cb2f7eb1ca4fa153e185ead4cfd49775fc1f7 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 15 Jan 2025 13:11:22 -0800 Subject: [PATCH] ci: switch to GHA (#325) --- .circleci/config.yml | 15 --------------- .github/workflows/test.yml | 34 ++++++++++++++++++++++++++++++++++ .nvmrc | 2 +- README.md | 5 ++--- 4 files changed, 37 insertions(+), 19 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/test.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index bb4b866..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: 2.1 - -orbs: - node: electronjs/node@2.3.1 - -workflows: - build: - jobs: - - node/test: - executor: node/linux - node-version: "20.12" - use-test-steps: true - test-steps: - - run: yarn lint - - run: yarn test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1255cb3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: Test + +on: + workflow_dispatch: + schedule: + - cron: '0 19 * * 1-5' + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Setup Node.js + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Lint + run: yarn lint + - name: Test + run: yarn test diff --git a/.nvmrc b/.nvmrc index b6a7d89..2bd5a0a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +22 diff --git a/README.md b/README.md index b7171b8..021cb44 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -[![CircleCI](https://dl.circleci.com/status-badge/img/gh/electron/trop/tree/main.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/electron/trop/tree/main) - # trop +[![Test](https://github.com/electron/trop/actions/workflows/test.yml/badge.svg)](https://github.com/electron/trop/actions/workflows/test.yml) + > a GitHub App built with [probot](https://github.com/probot/probot) that automates the process of backporting features and bugfixes. ```js @@ -25,7 +25,6 @@ npm install npm start ``` - ## Documentation To learn how to use `trop`, see [usage](docs/usage.md).