-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE-68] Fix github ci for cross-repos
- Loading branch information
Showing
2 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,40 +5,49 @@ | |
# 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: Code Coverage | ||
|
||
on: [push, workflow_dispatch, pull_request] | ||
|
||
name: Code Guard | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
|
||
checks: write | ||
contents: write | ||
jobs: | ||
test: | ||
permissions: | ||
checks: write | ||
contents: write | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
rails-version: ["6.1", "7.1"] | ||
rails-version: ['6.1', '7.1'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0 | ||
ruby-version: '3.0' | ||
- name: Install dependencies | ||
run: bundle install | ||
env: | ||
TEST_RAILS_VERSION: ${{ matrix.rails-version }} | ||
DEBUG: true | ||
- name: Run tests | ||
run: bundle exec rake | ||
- name: Code Coverage | ||
uses: joshmfrankel/simplecov-check-action@main | ||
with: | ||
check_job_name: Code Coverage | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
minimum_suite_coverage: 100 | ||
- name: Lint | ||
uses: standardrb/standard-ruby-action@v1 | ||
# Doesn't work. Needs secret or repo setting update | ||
# - name: Code Coverage | ||
# if: matrix.rails-version == '7.1' | ||
# uses: joshmfrankel/[email protected] | ||
# with: | ||
# check_job_name: Code Coverage | ||
# minimum_suite_coverage: 100 | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Doesn't work. Needs secret or repo setting update? | ||
# lint: | ||
# needs: [test] | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - name: Lint | ||
# uses: standardrb/standard-ruby-action@v1 | ||
# with: | ||
# ruby-version: '3.0' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
require "standard/rake" | ||
|
||
desc "Run all examples" | ||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
task default: :spec | ||
task default: [:spec, :standard] |