diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eeb4baf3..4e2310cb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,6 +16,7 @@ jobs: - name: Check out uses: actions/checkout@v3 with: + fetch-depth: 100 ref: ${{ github.head_ref }} submodules: "recursive" @@ -64,11 +65,23 @@ jobs: ruby-version: '2.7' bundler-cache: true + - name: Cache gems + uses: actions/cache@v1 + with: + path: sample/vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }} + restore-keys: | + ${{ runner.os }}-gems- + - name: Run Danger to wrap up the review + uses: MeilCli/danger-action@v5 + with: + plugins_file: 'Gemfile' + install_path: 'sample/vendor/bundle' + danger_file: 'sample/Dangerfile' + danger_id: 'danger-pr' env: DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} - working-directory: ./sample - run: bundle exec danger # Submit the sample project changes