diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7f7047503..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,66 +0,0 @@ -version: 2.1 -jobs: - get-cli: - working_directory: /tmp/workspace - docker: - - image: circleci/node:10.13.0 - steps: - - checkout - - run-cli-tests: - macos: - xcode: "11.1.0" - working_directory: /tmp/workspace - - steps: - - checkout - - - run: - command: npm install - working_directory: /tmp/workspace/cli - - - run: - command: npm run build - working_directory: /tmp/workspace/cli - - - run: - command: npm run test - working_directory: /tmp/workspace/cli - - - run: - command: npm run lint - working_directory: /tmp/workspace/cli - - build-ios: - macos: - xcode: "11.1.0" - working_directory: /tmp/workspace - - steps: - - checkout - - run: - command: cd ios && pod lib lint --allow-warnings Capacitor.podspec - - run: - command: cd ios && pod lib lint --allow-warnings CapacitorCordova.podspec - - build-android: - docker: - - image: circleci/android:api-29-node - working_directory: /tmp/workspace - - steps: - - checkout - - run: - command: ./gradlew clean build -b capacitor/build.gradle -Pandroid.useAndroidX=true -Pandroid.enableJetifier=true - working_directory: /tmp/workspace/android - -workflows: - version: 2.1 - node-ios-android: - jobs: - - get-cli - - run-cli-tests: - requires: - - get-cli - - build-ios - - build-android \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..ca99adf4b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + test-cli: + runs-on: macos-latest + timeout-minutes: 30 + defaults: + run: + working-directory: ./cli + steps: + - uses: actions/setup-node@v1 + with: + node-version: 14.x + - uses: actions/checkout@v2 + - name: Restore Dependency Cache + uses: actions/cache@v1 + with: + path: ~/.npm + key: ${{ runner.OS }}-dependency-cache-${{ hashFiles('**/package.json') }} + - run: npm install + - run: npm run build + - run: npm run lint + - run: npm test + test-ios: + runs-on: macos-latest + timeout-minutes: 30 + defaults: + run: + working-directory: ./ios + steps: + - uses: actions/checkout@v2 + - run: pod lib lint --allow-warnings Capacitor.podspec + - run: pod lib lint --allow-warnings CapacitorCordova.podspec + test-android: + runs-on: ubuntu-latest + timeout-minutes: 30 + defaults: + run: + working-directory: ./android + steps: + - uses: actions/checkout@v2 + - run: ./gradlew clean build -b capacitor/build.gradle -Pandroid.useAndroidX=true -Pandroid.enableJetifier=true diff --git a/cli/package.json b/cli/package.json index 27683441f..16dccd6a6 100644 --- a/cli/package.json +++ b/cli/package.json @@ -19,7 +19,7 @@ "lint": "tslint --project tsconfig.json", "assets": "node scripts/copy-assets.js", "prepublishOnly": "npm run build", - "test": "jest --maxWorkers=4", + "test": "jest -i", "watch": "npm run assets && tsc -w" }, "files": [