Initial pundit-plus implementation #1
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: Testing | |
on: | |
push: | |
branches-ignore: [master] | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ["3.2"] | |
env: | |
NOTIFY_SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
NOTIFY_SLACK_NOTIFY_CHANNEL: "oss-notices" | |
NOTIFY_CURRENT_REPOSITORY_URL: "${{ github.server_url }}/${{ github.repository }}" | |
NOTIFY_TEST_RUN_ID: "${{ github.run_id }}" | |
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.version }} | |
bundler-cache: true | |
- name: Update Bundle | |
run: bundle check || bundle install | |
- name: Set ownership | |
run: | | |
# this is to fix GIT not liking owner of the checkout dir | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- uses: amancevice/setup-code-climate@v1 | |
with: | |
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }} | |
- run: cc-test-reporter before-build | |
- name: Test | |
run: bundle exec rake | |
- run: cc-test-reporter after-build | |
if: ${{ github.event_name != 'pull_request' }} | |
linter: | |
name: Linter | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ["3.2"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.version }} | |
bundler-cache: true | |
- run: bundle exec standardrb |