diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index b5d9a45c..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,154 +0,0 @@ -# ------------------------- -# ALIASES -# ------------------------- - -aliases: - # CACHE - - &restore-gradle-cache - keys: - - gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "example/android/build.gradle" }}-{{ checksum "example/android/app/build.gradle" }} - - &save-gradle-cache - paths: - - ~/.gradle - key: gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "example/android/build.gradle" }}-{{ checksum "example/android/app/build.gradle" }} - - # ANALYSE - - &eslint - name: ESLint Checks - command: yarn lint - - - &type-check - name: TypeScript Checks - command: yarn tsc - - - &flow - name: Flow TypeChecks - command: yarn flow - - - &jest - name: Jest Unit Tests - command: yarn test - -# ------------------------- -# JOBS -# ------------------------- -version: 2.1 -orbs: - rn: react-native-community/react-native@2.0.1 - -jobs: - # Set up a Linux environment for downstream jobs - linux-checkout: - executor: - name: rn/linux_js - node_version: '10' - steps: - - attach_workspace: - at: . - - checkout - - rn/yarn_install - - persist_to_workspace: - root: . - paths: . - - eslint: - executor: - name: rn/linux_js - node_version: '10' - steps: - - attach_workspace: - at: . - - run: *eslint - - type-check: - executor: - name: rn/linux_js - node_version: '10' - steps: - - attach_workspace: - at: . - - run: *type-check - - flow: - executor: - name: rn/linux_js - node_version: '10' - steps: - - attach_workspace: - at: . - - run: *flow - - jest: - executor: - name: rn/linux_js - node_version: '10' - steps: - - attach_workspace: - at: . - - run: *jest - - android-compile: - executor: rn/linux_android - steps: - - attach_workspace: - at: . - - restore_cache: *restore-gradle-cache - - run: - name: Accept Android licences - command: |- - yes | sdkmanager --licenses || exit 0 - yes | sdkmanager --update || exit 0 - - run: - name: Build Android Example App and Library - command: |- - cd example/android - ./gradlew clean assembleDebug - - save_cache: *save-gradle-cache - - ios-checkout: - executor: rn/macos - steps: - - checkout - - rn/yarn_install - - persist_to_workspace: - root: . - paths: . - - ios-compile: - executor: rn/macos - steps: - - attach_workspace: - at: . - - run: - name: Build example app - command: |- - react-native run-ios --project-path example/ios - -# ------------------------- -# WORKFLOWS -# ------------------------- -workflows: - version: 2 - Test: - jobs: - - linux-checkout - - eslint: - requires: - - linux-checkout - - type-check: - requires: - - linux-checkout - - jest: - requires: - - linux-checkout - - flow: - requires: - - linux-checkout - - android-compile: - requires: - - linux-checkout -# Disabled until we have macOS containers enabled -# - ios-checkout -# - ios-compile: -# requires: -# - ios-checkout diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..55fc2c65 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,111 @@ +name: Build +on: pull_request + +jobs: + lint: + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: [10] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + - name: Install Dependencies + run: yarn + - name: ESLint Checks + run: yarn lint + flow: + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: [10] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + - name: Install Dependencies + run: yarn + - name: FlowType Check + run: yarn flow + tsc: + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: [10] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + - name: Install Dependencies + run: yarn + - name: TypeScript type check + run: yarn type-check + android: + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: [10] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + - name: Install Dependencies + run: yarn + - name: Build Android Example App and Library + run: cd example/android && ./gradlew clean assembleDebug + ios: + runs-on: macos-latest + strategy: + matrix: + node-version: [10] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + - name: Install Dependencies + run: yarn + - name: Install Podfiles + run: cd example && npx pod-install + - name: Build example app + run: yarn ios diff --git a/README.md b/README.md index 5f906ad0..bb502fdb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # @react-native-community/progress-view [![Build Status][build-badge]][build] +[![Windows CI Status][windows-ci-badge]][build] [![Version][version-badge]][package] ![Platforms][support-badge] [![MIT License][license-badge]][license] @@ -211,8 +212,9 @@ Turns progress bar into an indeterminate progress bar The library is released under the MIT license. For more information see [`LICENSE`](/LICENSE). -[build-badge]: https://img.shields.io/circleci/project/github/react-native-community/progress-view/master.svg?style=flat-square -[build]: https://circleci.com/gh/react-native-community/progress-view +[build-badge]: https://github.com/react-native-community/progress-view/workflows/Build/badge.svg +[windows-ci-badge]:https://github.com/react-native-community/progress-view/workflows/Windows%20CI/badge.svg +[build]: https://github.com/react-native-community/progress-view/actions [version-badge]: https://img.shields.io/npm/v/@react-native-community/progress-view.svg?style=flat-square [package]: https://www.npmjs.com/package/@react-native-community/progress-view [support-badge]:https://img.shields.io/badge/platforms-ios%20|%20macos-lightgrey.svg?style=flat-square