Slide 1

Slide 1 text

Practical CI/CD for React Native

Slide 2

Slide 2 text

Works on my machine! Pack your machine. We send it to production!

Slide 3

Slide 3 text

Developer *.apk Tester

Slide 4

Slide 4 text

https://martinfowler.com/articles/continuousIntegration.html Martin Fowler Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day.

Slide 5

Slide 5 text

https://martinfowler.com/articles/continuousIntegration.html Martin Fowler Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

CI

Slide 8

Slide 8 text

Main branch Feature Branch

Slide 9

Slide 9 text

GitHub Actions github.com/ariya/hello-react-native

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

codequality.yml name: CodeQuality on: [push, pull_request] jobs: check: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Use Node.js v12 uses: actions/setup-node@v1 with: node-version: 12.x - run: npm ci - run: npm test

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

android.yml name: Android on: [push, pull_request] jobs: build: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Use Node.js v12 uses: actions/setup-node@v1 with: node-version: 12.x - run: npm ci - run: ./gradlew assembleDebug working-directory: android name: Build Android apk (debug)

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

ios.yml name: iOS on: [push, pull_request] jobs: build: runs-on: macos-latest steps: - uses: actions/checkout@v2 - name: Use Node.js uses: actions/setup-node@v1 with: node-version: 10.x - run: npm ci

Slide 18

Slide 18 text

ios.yml - run: pod install working-directory: ios name: Install pod dependencies - name: Build iOS (debug) run: "xcodebuild \ -workspace ios/HelloReactNative.xcworkspace \ -scheme HelloReactNative \ clean archive \ -sdk iphoneos \ -configuration Debug \ -UseModernBuildSystem=NO \ -archivePath $PWD/HelloReactNative \ CODE_SIGNING_ALLOWED=NO"

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

CD

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

App Center github.com/ariya/hello-react-native

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

Tester

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Epilog

Slide 35

Slide 35 text

App Center GitHub Actions

Slide 36

Slide 36 text

Mitigate Human Error 1

Slide 37

Slide 37 text

Guarantee Consistency 2

Slide 38

Slide 38 text

Authoritative Reference 3

Slide 39

Slide 39 text

Extensive Automation 4

Slide 40

Slide 40 text

Archive & History 5

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Thank You Some artworks are from http://openclipart.org. @ariyahidayat