From c87b5d6cc4d96e9b7119ecff6d1a5c173b08fa6d Mon Sep 17 00:00:00 2001 From: Leigh Simpson Date: Mon, 7 Aug 2023 18:47:02 +0100 Subject: [PATCH] Switch builds to GitHub actions ### Why? I haven't used Travis for a few years and am standardising on GitHub for most personal projects. ### What? * add `build.yml` and remove old Travis config * update `dependabot.yml` to keep actions up-to-date --- .github/dependabot.yml | 5 +++++ .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ .travis.yml | 10 ---------- README.md | 2 +- 4 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1aa1f54e..5b8cc8fe 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,11 @@ version: 2 updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + - package-ecosystem: npm directory: / schedule: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..b3be3613 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Build + +on: push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node + # https://github.com/actions/setup-node + uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: yarn + + - name: Install Node dependencies + run: yarn install --frozen-lockfile + + - name: Build + run: yarn build + + - name: Lint + run: yarn lint + + - name: Test + run: yarn test --single-run + + - name: Publish test coverage + # https://github.com/codecov/codecov-action + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + + - name: Build docs + run: yarn typedoc diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2777567e..00000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 18 - - 20 -script: - - yarn build - - yarn lint - - yarn test --single-run - - codecov - - yarn doc diff --git a/README.md b/README.md index a8c5922d..5c39bafb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # touch-pricker -[![Build Status](https://travis-ci.org/simpleigh/touch-pricker.svg?branch=master)](https://travis-ci.org/simpleigh/touch-pricker) +[![Build Status](https://img.shields.io/github/actions/workflow/status/simpleigh/touch-pricker/build.yml)](https://github.com/simpleigh/dotjs-loader/actions/workflows/build.yml) [![Codecov](https://img.shields.io/codecov/c/github/simpleigh/touch-pricker.svg)](https://codecov.io/gh/simpleigh/touch-pricker) Free Touch Pricker