diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index e7916e83..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details -# -version: 2 -jobs: - build: - environment: - CC_TEST_REPORTER_ID: 9b36beb22e04451e6414fcc28926f995c253d94877f616b50d192255196fbb68 - docker: - # specify the version you desire here - - image: cimg/node:20.12.0 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/mongo:3.4.4 - - working_directory: ~/repo - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: - name: Setup Code Climate test-reporter - command: | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - - - run: yarn install - - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - - run: - name: Run Tests and Upload Coverage - command: | - ./cc-test-reporter before-build - yarn run test:coverage - ./cc-test-reporter after-build --exit-code $? diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..35f78602 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: build +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version-file: .nvmrc + + - name: Install dependencies + run: yarn + + - name: Run ESLint + run: yarn lint + + - name: Setup Code Climate + uses: remarkablemark/setup-codeclimate@v2 + + - name: Run Tests and Upload Coverage + run: | + cc-test-reporter before-build + yarn test:coverage + cc-test-reporter after-build --exit-code $? + env: + CC_TEST_REPORTER_ID: 9b36beb22e04451e6414fcc28926f995c253d94877f616b50d192255196fbb68 + + - name: Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..209e3ef4 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 diff --git a/README.md b/README.md index d43a800f..62388277 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![npm version](https://badge.fury.io/js/react-native-picker-select.svg)](https://badge.fury.io/js/react-native-picker-select) [![npm downloads](https://img.shields.io/npm/dm/react-native-picker-select.svg?style=flat-square)](https://www.npmjs.com/package/react-native-picker-select) [![Test Coverage](https://api.codeclimate.com/v1/badges/095f5b1ee137705ed382/test_coverage)](https://codeclimate.com/github/lawnstarter/react-native-picker-select/test_coverage) -[![CircleCI](https://circleci.com/gh/lawnstarter/react-native-picker-select.svg?style=svg)](https://circleci.com/gh/lawnstarter/react-native-picker-select) +[![build](https://github.com/lawnstarter/react-native-picker-select/actions/workflows/build.yml/badge.svg)](https://github.com/lawnstarter/react-native-picker-select/actions/workflows/build.yml) A Picker component for React Native which emulates the native `