Skip to content

Now supporting multiple providers with automatic fallback #91

Now supporting multiple providers with automatic fallback

Now supporting multiple providers with automatic fallback #91

Workflow file for this run

name: CI
on:
pull_request:
branches:
- '**'
types:
- opened
- synchronize
- reopened
push:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run Code Climate Test Reporter before-build
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run tests with coverage
run: npm run coverage
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
- name: Format coverage report for Code Climate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
./cc-test-reporter format-coverage coverage/lcov.info \
--input-type lcov \
--output coverage/codeclimate.json
- name: Upload coverage to Code Climate
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: |
./cc-test-reporter upload-coverage \
--input coverage/codeclimate.json