Skip to content

Commit

Permalink
Merge pull request #23 from infinitered/new-release
Browse files Browse the repository at this point in the history
remove publish from circleci
  • Loading branch information
trevor-coleman authored Sep 14, 2023
2 parents c05c2a3 + 8d53eb0 commit 5ae7d38
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 133 deletions.
9 changes: 9 additions & 0 deletions .changeset/lovely-numbers-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@infinitered/react-native-mlkit-object-detection": minor
"@infinitered/react-native-mlkit-face-detection": minor
"@infinitered/react-native-mlkit-image-labeling": minor
"@infinitered/react-native-mlkit-core": minor
"@infinitered/infinite-red-ai": minor
---

Fixing build scripts
9 changes: 9 additions & 0 deletions .changeset/rare-gifts-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@infinitered/react-native-mlkit-object-detection": patch
"@infinitered/react-native-mlkit-face-detection": patch
"@infinitered/react-native-mlkit-image-labeling": patch
"@infinitered/react-native-mlkit-core": patch
"@infinitered/infinite-red-ai": patch
---

add dummy tests
23 changes: 2 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,8 @@ commands:
- run:
working_directory: << parameters.working_directory >>
name: Run static tests
command: yarn ci:lint && yarn ci:test
command: yarn lint && yarn test
no_output_timeout: 5m
common-publish:
parameters:
working_directory:
description: Path to the directory where the tests are run
type: string
default: .
steps:
- run:
working_directory: << parameters.working_directory >>
name: Publish to NPM
command: yarn ci:publish
common-build-core:
steps:
- run:
Expand All @@ -77,17 +66,9 @@ commands:
steps:
- run:
working_directory: << parameters.working_directory >>
name: Publish to NPM
name: Build package
command: yarn build

# Common jobs for the main workflows
jobs:
common-pre:
docker:
- image: alpine
steps:
- common-say-hello
- run: echo 'Jobs with `common-` prefix are intended to be shared among modules'

workflows:
# The setup workflow
Expand Down
25 changes: 4 additions & 21 deletions modules/react-native-mlkit-core/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defaults: &defaults
version: 2.1

jobs:
core-tests:
core-lint-and-tests:
<<: *defaults
resource_class: large
steps:
Expand All @@ -29,26 +29,9 @@ jobs:
- common-build-core
- common-static-tests:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-core
core-publish:
<<: *defaults
steps:
- checkout
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- common-install-deps
- common-build-core
# Run semantic-release after all the above is set.
- common-publish:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-core

workflows:
version: 2
core-test_and_release:
core-test:
jobs:
- core-tests
- core-publish:
context: infinitered-npm-package
requires:
- core-tests
filters:
branches:
only: main
- core-lint-and-tests

7 changes: 1 addition & 6 deletions modules/react-native-mlkit-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
"test": "jest",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
"ci:publish": "npm publish",
"ci:lint": "echo \"Fake linting....\"",
"ci:test": "echo \"Fake testing....\"",
"expo-module": "expo-module",
"open:ios": "open -a \"Xcode\" example/ios",
"open:android": "open -a \"Android Studio\" example/android"
"expo-module": "expo-module"
},
"keywords": [
"react-native",
Expand Down
26 changes: 4 additions & 22 deletions modules/react-native-mlkit-face-detection/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version: 2.1
orbs: node:circleci/[email protected]

jobs:
face-detection-tests:
face-detection-lint-and-tests:
<<: *defaults
resource_class: large
steps:
Expand All @@ -31,28 +31,10 @@ jobs:
- common-build-core
- common-static-tests:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-face-detection
face-detection-publish:
<<: *defaults
steps:
- checkout
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- common-install-deps
- common-build-core
- common-build:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-face-detection
# Run semantic-release after all the above is set.
- common-publish:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-face-detection

workflows:
version: 2
face-detection-test_and_release:
face-detection-test:
jobs:
- face-detection-tests
- face-detection-publish:
context: infinitered-npm-package
requires:
- face-detection-tests
filters:
branches:
only: main
- face-detection-lint-and-tests

7 changes: 1 addition & 6 deletions modules/react-native-mlkit-face-detection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
"test": "expo-module test",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
"expo-module": "expo-module",
"ci:publish": "echo \"Fake publishing to NPM\"",
"ci:lint": "echo \"Fake linting....\"",
"ci:test": "echo \"Fake testing....\"",
"open:ios": "open -a \"Xcode\" example/ios",
"open:android": "open -a \"Android Studio\" example/android"
"expo-module": "expo-module"
},
"keywords": [
"react-native",
Expand Down
5 changes: 5 additions & 0 deletions modules/react-native-mlkit-face-detection/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe("placeholder test", () => {
it("should pass", () => {
expect(true).toBe(true);
});
});
27 changes: 4 additions & 23 deletions modules/react-native-mlkit-image-labeling/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version: 2.1
orbs: node:circleci/[email protected]

jobs:
image-labeling-tests:
image-labeling-lint-and-tests:
<<: *defaults
resource_class: large
steps:
Expand All @@ -31,28 +31,9 @@ jobs:
- common-build-core
- common-static-tests:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-image-labeling
image-labeling-publish:
<<: *defaults
steps:
- checkout
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- common-install-deps
- common-build-core
- common-build:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-image-labeling
# Run semantic-release after all the above is set.
- common-publish:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-image-labeling

workflows:
version: 2
image-labeling-test_and_release:
image-labeling-test:
jobs:
- image-labeling-tests
- image-labeling-publish:
context: infinitered-npm-package
requires:
- image-labeling-tests
filters:
branches:
only: main
- image-labeling-lint-and-tests

7 changes: 1 addition & 6 deletions modules/react-native-mlkit-image-labeling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
"test": "expo-module test",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
"ci:publish": "echo \"Fake publishing to NPM\"",
"ci:lint": "echo \"Fake linting....\"",
"ci:test": "echo \"Fake testing....\"",
"expo-module": "expo-module",
"open:ios": "open -a \"Xcode\" example/ios",
"open:android": "open -a \"Android Studio\" example/android"
"expo-module": "expo-module"
},
"keywords": [
"react-native",
Expand Down
5 changes: 5 additions & 0 deletions modules/react-native-mlkit-image-labeling/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe("placeholder test", () => {
it("should pass", () => {
expect(true).toBe(true);
});
});
25 changes: 3 additions & 22 deletions modules/react-native-mlkit-object-detection/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version: 2.1
orbs: node:circleci/[email protected]

jobs:
object-detection-tests:
object-detection-lint-and-tests:
<<: *defaults
resource_class: large
steps:
Expand All @@ -31,28 +31,9 @@ jobs:
- common-build-core
- common-static-tests:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-object-detection
object-detection-publish:
<<: *defaults
steps:
- checkout
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- common-install-deps
- common-build-core
- common-build:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-object-detection
# Run semantic-release after all the above is set.
- common-publish:
working_directory: /mnt/ramdisk/repo/modules/react-native-mlkit-object-detection

workflows:
version: 2
object-detection-test_and_release:
object-detection-test:
jobs:
- object-detection-tests
- object-detection-publish:
context: infinitered-npm-package
requires:
- object-detection-tests
filters:
branches:
only: main
- object-detection-lint-and-tests
7 changes: 1 addition & 6 deletions modules/react-native-mlkit-object-detection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@
"test": "expo-module test",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
"ci:publish": "echo \"Fake publishing to NPM\"",
"ci:lint": "echo \"Fake linting....\"",
"ci:test": "echo \"Fake testing....\"",
"expo-module": "expo-module",
"open:ios": "open -a \"Xcode\" example/ios",
"open:android": "open -a \"Android Studio\" example/android"
"expo-module": "expo-module"
},
"keywords": [
"react-native",
Expand Down
5 changes: 5 additions & 0 deletions modules/react-native-mlkit-object-detection/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe("placeholder test", () => {
it("should pass", () => {
expect(true).toBe(true);
});
});

0 comments on commit 5ae7d38

Please sign in to comment.