From e22c8d8b32e2695b6cb6fdd188700d1593f8d636 Mon Sep 17 00:00:00 2001 From: Binnette Date: Fri, 5 Jul 2024 17:53:20 +0200 Subject: [PATCH 1/2] Add GitHub workflow and Update badges --- .github/workflows/build-tests-coverage.yml | 36 ++++++++++++++++++++++ README.md | 6 ++-- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-tests-coverage.yml diff --git a/.github/workflows/build-tests-coverage.yml b/.github/workflows/build-tests-coverage.yml new file mode 100644 index 0000000..76bfbe8 --- /dev/null +++ b/.github/workflows/build-tests-coverage.yml @@ -0,0 +1,36 @@ +name: Build, Tests and Coverage + +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + +jobs: + build-tests-coverage: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4.1.7 + + - name: Setup Node.js environment + uses: actions/setup-node@v4.0.2 + with: + node-version: 20 + + - name: Install dependencies + run: npm ci + + - name: Build project + run: npm run build + + - name: Run tests and generate coverage report + run: npm run test-ci + + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@v2.3.0 diff --git a/README.md b/README.md index 834e77c..372b7fb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) -[![GitHub release](https://img.shields.io/github/release/osmlab/osm-request.svg)](https://github.com/osmlab/osm-request/releases) -[![Build Status](https://api.travis-ci.org/osmlab/osm-request.svg?branch=develop)](http://travis-ci.org/osmlab/osm-request) -[![Coverage Status](https://coveralls.io/repos/github/osmlab/osm-request/badge.svg?branch=develop)](https://coveralls.io/github/osmlab/osm-request?branch=develop) +[![GitHub Tag](https://img.shields.io/github/v/tag/osmlab/osm-request)](https://github.com/osmlab/osm-request/tags) +[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/osmlab/osm-request/build-tests-coverage.yml)](https://github.com/osmlab/osm-request/actions/workflows/build-tests-coverage.yml) +[![Coverage Status](https://coveralls.io/repos/github/osmlab/osm-request/badge.svg)](https://coveralls.io/github/osmlab/osm-request) # OSM Request From 37cc5f1c6324e7d05f3fc2acd29eb87fdbfdca64 Mon Sep 17 00:00:00 2001 From: Binnette Date: Fri, 5 Jul 2024 18:04:18 +0200 Subject: [PATCH 2/2] Delete travis conf --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 40f56fb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - "20" -cache: - directories: - - node_modules -script: - - npm run lint - - npm run test-prettier - - npm run test-ci && cat ./coverage/lcov.info | npx coveralls - - npm run build