Add github action worflow and Danger bot (#8) #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull request workflow | |
on: | |
push: | |
branches: [ "develop", "main"] | |
pull_request: | |
branches: [ "develop", "main" ] | |
jobs: | |
build: | |
name: Build and Test default scheme using any available iPhone simulator | |
runs-on: macos-12 | |
permissions: | |
pull-requests: write # required for Danger to post comments | |
issues: write # required for Danger to post comments | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 100 | |
- name: Install pods | |
run: cd RecipeApp && pod install | |
- name: Install Bundles | |
run: cd RecipeApp && bundle install | |
- name: Run tests | |
run: cd RecipeApp && bundle exec fastlane tests | |
# - name: Run code coverage | |
# run: cd RecipeApp && bundle exec fastlane tests_coverage | |
- name: Run Danger | |
uses: MeilCli/danger-action@v5 | |
with: | |
danger_file: 'RecipeApp/Dangerfile' | |
danger_id: 'danger-pr' | |
env: | |
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} |