# CI/CD configuration file

version: 2.1

orbs:
  android: circleci/android@2.3.0

jobs:
  lint-and-test-and-build:
    executor:
      name: android/android-machine
      tag: '2023.04.1'
      resource-class: large 
    steps:
      - checkout

      # lint
      - android/restore-gradle-cache
      - run: 
          name: Run linter
          command: cd client && ./gradlew lintDebug
      - android/save-gradle-cache

      # unit tests
      - run:
          name: Unit tests
          command: cd client && ./gradlew testDebugUnitTest
      
      # build it
      - android/restore-build-cache
      - run:
          name: Build
          command: cd client && ./gradlew build
      - android/save-build-cache


workflows:
  build_and_test:
    jobs:
      - lint-and-test-and-build