Use a null object to avoid checks to @instance #83
Workflow file for this run
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: Rails Multisite Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.ok_to_fail == ' - Ok to fail' }} | |
name: "Ruby ${{ matrix.ruby }} - Rails ${{ matrix.rails }}${{ matrix.ok_to_fail }}" | |
env: | |
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ["3.0", "3.1", "3.2", "3.3"] | |
rails: ["6.1", "7.0", "7.1", "edge"] | |
ok_to_fail: [""] | |
exclude: | |
- ruby: "3.0" | |
rails: "edge" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Rubocop | |
run: bundle exec rubocop | |
- name: Tests | |
run: bundle exec rspec | |
publish: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Release Gem | |
uses: discourse/publish-rubygems-action@v3 | |
env: | |
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
GIT_EMAIL: [email protected] | |
GIT_NAME: discoursebot |