Merge pull request #166 from ryantaylor/dependabot/bundler/rubocop-1.… #342
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: Checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
ruby-test: | |
runs-on: ubuntu-latest | |
name: Ruby Tests | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- 1.66.0 | |
ruby: | |
- '3.3.4' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Compile gem | |
run: bundle exec rake compile | |
- name: Run tests | |
run: bundle exec rspec | |
rubocop: | |
runs-on: ubuntu-latest | |
name: Rubocop | |
strategy: | |
matrix: | |
ruby: | |
- '3.3.4' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Run Rubocop | |
run: bundle exec rubocop | |
cargo-check: | |
name: Cargo Check | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- 1.66.0 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Run cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
cargo-clippy: | |
name: Cargo Clippy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- 1.66.0 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Install clippy | |
run: rustup component add clippy | |
- name: Run cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
cargo-fmt: | |
name: Cargo Fmt | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- 1.66.0 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Install rustfmt | |
run: rustup component add rustfmt | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
cargo-test: | |
name: Cargo Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- 1.66.0 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Run cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test |