Skip to content

Commit

Permalink
Merge pull request #401 from kosenda/feature/circle-ci
Browse files Browse the repository at this point in the history
Circle Ci 全体的に見直し(勉強兼ねて)
  • Loading branch information
kosenda authored Dec 24, 2023
2 parents 7b84e00 + ada3571 commit 2de29a4
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,58 @@ version: 2.1

orbs:
slack: circleci/[email protected]
jobs:
build-and-test:

executors:
android:
docker:
- image: cimg/android:2023.12

commands:
set-locale-properties:
steps:
- checkout
- run:
name: set local.properties
command: |
LOCAL_PROPERTIES_PATH=./local.properties
echo "apiKey=$.Environment.DEBUG_AD_APPLICATION_ID" >> $LOCAL_PROPERTIES_PATH
LOCAL_PROPERTIES_PATH=./local.properties
echo "apiKey=$.Environment.DEBUG_AD_APPLICATION_ID" >> $LOCAL_PROPERTIES_PATH
jobs:
build-and-test:
executor: android
steps:
- checkout
- set-locale-properties
- restore_cache:
key: jars-{{ checksum "build.gradle.kts" }}-{{ checksum "app/build.gradle.kts" }}
- run: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle.kts" }}-{{ checksum "app/build.gradle.kts" }}

- run:
neme: gem install bundler
command: sudo gem install bundler:2.4.12

- run:
command: bundle install --path vendor/bundle

name: bundle install
# Specify Gemfile path and then run bundle install
command: |
bundle config set --local path 'vendor/bundle'
bundle install
- run:
name: ktlint-check
command: ./gradlew --continue ktlintCheck

- run:
name: test
command: ./gradlew testProdDebug --stacktrace

- run:
name: jacoco-report
command: ./gradlew jacocoTestReport

- run:
name: run-danger-file
command: bundle exec danger --verbose

- slack/notify:
event: fail
template: basic_fail_1

- slack/notify:
event: pass
template: basic_success_1
Expand All @@ -59,10 +65,4 @@ workflows:
context: slack-secrets

# ■ memo ■
# チェックコマンド: circleci config validate
#
# ■ 特に参考にしたサイト ■
# Android プロジェクトの継続的インテグレーション
# https://circleci.com/ja/blog/building-android-on-circleci/
# 3年の運用で編み出した CircleCI 超設計大全
# https://qiita.com/dodonki1223/items/98dbdac6f31f9b486ecf
# check command: circleci config validate

0 comments on commit 2de29a4

Please sign in to comment.